Skip to content
Snippets Groups Projects
  1. Apr 11, 2017
  2. Apr 07, 2017
  3. Apr 06, 2017
  4. Apr 05, 2017
  5. Apr 04, 2017
  6. Apr 03, 2017
  7. Apr 01, 2017
  8. Mar 31, 2017
  9. Mar 30, 2017
  10. Mar 29, 2017
    • Adam Nemet's avatar
      Use FPContractModeKind universally · 922e16ba
      Adam Nemet authored
      FPContractModeKind is the codegen option flag which is already ternary (off,
      on, fast).  This makes it universally the type for the contractable info
      across the front-end:
      
      * In FPOptions (i.e. in the Sema + in the expression nodes).
      * In LangOpts::DefaultFPContractMode which is the option that initializes
      FPOptions in the Sema.
      
      Another way to look at this change is that before fp-contractable on/off were
      the only states handled to the front-end:
       * For "on", FMA folding was performed by  the front-end
       * For "fast", we simply forwarded the flag to TargetOptions to handle it in
       LLVM
      
      Now off/on/fast are all exposed because for fast we will generate
      fast-math-flags during CodeGen.
      
      This is toward moving fp-contraction=fast from an LLVM TargetOption to a
      FastMathFlag in order to fix PR25721.
      
      ---
      This is a recommit of r299027 with an adjustment to the test
      CodeGenCUDA/fp-contract.cu.  The test assumed that even
      though -ffp-contract=on is passed FE-based folding of FMA won't happen.
      
      This is obviously wrong since the user is asking for this explicitly with the
      option.  CUDA is different that -ffp-contract=fast is on by default.
      
      The test used to "work" because contract=fast and contract=on were maintained
      separately and we didn't fold in the FE because contract=fast was on due to
      the target-default.  This patch consolidates the contract=on/fast/off state
      into a ternary state hence the change in behavior.
      ---
      
      Differential Revision: https://reviews.llvm.org/D31167
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299033 91177308-0d34-0410-b5e6-96231b3b80d8
      922e16ba
    • Adam Nemet's avatar
      Revert "Use FPContractModeKind universally" · 38e2463d
      Adam Nemet authored
      This reverts commit r299027.
      
      It's causing a test failure in clang's CodeGenCUDE/fp-contract.cu
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299029 91177308-0d34-0410-b5e6-96231b3b80d8
      38e2463d
    • Adam Nemet's avatar
      Use FPContractModeKind universally · 66c3ea0d
      Adam Nemet authored
      FPContractModeKind is the codegen option flag which is already ternary (off,
      on, fast).  This makes it universally the type for the contractable info
      across the front-end:
      
      * In FPOptions (i.e. in the Sema + in the expression nodes).
      * In LangOpts::DefaultFPContractMode which is the option that initializes
      FPOptions in the Sema.
      
      Another way to look at this change is that before fp-contractable on/off were
      the only states handled to the front-end:
       * For "on", FMA folding was performed by  the front-end
       * For "fast", we simply forwarded the flag to TargetOptions to handle it in
       LLVM
      
      Now off/on/fast are all exposed because for fast we will generate
      fast-math-flags during CodeGen.
      
      This is toward moving fp-contraction=fast from an LLVM TargetOption to a
      FastMathFlag in order to fix PR25721.
      
      Differential Revision: https://reviews.llvm.org/D31167
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299027 91177308-0d34-0410-b5e6-96231b3b80d8
      66c3ea0d
    • Brian Kelley's avatar
      [Objective-C] Fix "weak-unavailable" warning with -fobjc-weak · 1cd6becc
      Brian Kelley authored
      Summary: clang should produce the same errors Objective-C classes that cannot be assigned to weak pointers under both -fobjc-arc and -fobjc-weak. Check for ObjCWeak along with ObjCAutoRefCount when analyzing pointer conversions. Add an -fobjc-weak pass to the existing arc-unavailable-for-weakref test cases to verify the behavior is the same.
      
      Reviewers: rsmith, doug.gregor, rjmccall
      
      Reviewed By: rjmccall
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D31006
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299014 91177308-0d34-0410-b5e6-96231b3b80d8
      1cd6becc
    • Brian Kelley's avatar
      [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak · f884a845
      Brian Kelley authored
      Summary: -Warc-repeated-use-of-weak should produce the same warnings with -fobjc-weak as it does with -objc-arc. Also check for ObjCWeak along with ObjCAutoRefCount when recording the use of an evaluated weak variable. Add a -fobjc-weak run to the existing arc-repeated-weak test case and adapt it slightly to work in both modes.
      
      Reviewers: rsmith, doug.gregor, jordan_rose, rjmccall
      
      Reviewed By: rjmccall
      
      Subscribers: arphaman, rjmccall, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D31005
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299011 91177308-0d34-0410-b5e6-96231b3b80d8
      f884a845
    • Graydon Hoare's avatar
      [PCH] Attach instance's dependency collectors to PCH external AST sources. · f2760ac9
      Graydon Hoare authored
      Summary:
      When a PCH is included via -include-pch, clang should treat the
      current TU as dependent on the sourcefile that the PCH was generated from.
      
      This is currently _partly_ accomplished by InitializePreprocessor calling
      AddImplicitIncludePCH to synthesize an implicit #include of the sourcefile,
      into the preprocessor's Predefines buffer.
      
      For FrontendActions such as PreprocessOnlyAction (which is, curiously, what the
      driver winds up running one of in response to a plain clang -M) this is
      sufficient: the preprocessor cranks over its Predefines and emits a dependency
      reference to the initial sourcefile.
      
      For other FrontendActions (for example -emit-obj or -fsyntax-only) the
      Predefines buffer is reset to the suggested predefines buffer from the PCH, so
      the dependency edge is lost. The result is that clang emits a .d file in those
      cases that lacks a reference to the .h file responsible for the input (and in
      Swift's case, our .swiftdeps file winds up not including a reference to the
      source file for a PCH bridging header.)
      
      This patch fixes the problem by taking a different tack: ignoring the
      Predefines buffer (which seems a bit like a hack anyways) and directly
      attaching the CompilerInstance's DependencyCollectors (and legacy
      DependencyFileGenerator) to the ASTReader for the external AST.
      
      This approach is similar to the one chosen in earlier consultation with Bruno
      and Ben, and I think it's the least-bad solution, given several options.
      
      Reviewers: bruno, benlangmuir, doug.gregor
      
      Reviewed By: bruno, doug.gregor
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D31378
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299009 91177308-0d34-0410-b5e6-96231b3b80d8
      f2760ac9
    • Egor Churaev's avatar
      Reapplied r298976 [OpenCL] Added parsing for OpenCL vector types. · 4c5e59fe
      Egor Churaev authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298992 91177308-0d34-0410-b5e6-96231b3b80d8
      4c5e59fe
    • Egor Churaev's avatar
      Reverted r298976 [OpenCL] Added parsing for OpenCL vector types. · d481ee52
      Egor Churaev authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298978 91177308-0d34-0410-b5e6-96231b3b80d8
      d481ee52
    • Egor Churaev's avatar
      [OpenCL] Added parsing for OpenCL vector types. · 51f8b6a9
      Egor Churaev authored
      Reviewers: cfe-commits, Anastasia
      
      Reviewed By: Anastasia
      
      Subscribers: yaxunl, bader
      
      Differential Revision: https://reviews.llvm.org/D31183
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298976 91177308-0d34-0410-b5e6-96231b3b80d8
      51f8b6a9
Loading