Skip to content
Snippets Groups Projects
  1. Mar 31, 2017
  2. Mar 30, 2017
  3. 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] Miscellaneous -fobjc-weak Fixes · 02bf8398
      Brian Kelley authored
      Summary: After examining the remaining uses of LangOptions.ObjCAutoRefCount, found a some additional places to also check for ObjCWeak not covered by previous test cases. Added a test file to verify all the code paths that were changed.
      
      Reviewers: rsmith, doug.gregor, rjmccall
      
      Reviewed By: rjmccall
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D31007
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299015 91177308-0d34-0410-b5e6-96231b3b80d8
      02bf8398
    • 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
    • Graydon Hoare's avatar
      Unbreak windows bot. · fa2e39d0
      Graydon Hoare authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299012 91177308-0d34-0410-b5e6-96231b3b80d8
      fa2e39d0
Loading