Skip to content
  1. Apr 29, 2015
    • David Blaikie's avatar
      [opaque pointer type] Pass GlobalAlias the actual pointer type rather than... · f64246be
      David Blaikie authored
      [opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space
      
      Many of the callers already have the pointer type anyway, and for the
      couple of callers that don't it's pretty easy to call PointerType::get
      on the pointee type and address space.
      
      This avoids LLParser from using PointerType::getElementType when parsing
      GlobalAliases from IR.
      
      llvm-svn: 236160
      f64246be
    • Duncan P. N. Exon Smith's avatar
      IR: Give 'DI' prefix to debug info metadata · a9308c49
      Duncan P. N. Exon Smith authored
      Finish off PR23080 by renaming the debug info IR constructs from `MD*`
      to `DI*`.  The last of the `DIDescriptor` classes were deleted in
      r235356, and the last of the related typedefs removed in r235413, so
      this has all baked for about a week.
      
      Note: If you have out-of-tree code (like a frontend), I recommend that
      you get everything compiling and tests passing with the *previous*
      commit before updating to this one.  It'll be easier to keep track of
      what code is using the `DIDescriptor` hierarchy and what you've already
      updated, and I think you're extremely unlikely to insert bugs.  YMMV of
      course.
      
      Back to *this* commit: I did this using the rename-md-di-nodes.sh
      upgrade script I've attached to PR23080 (both code and testcases) and
      filtered through clang-format-diff.py.  I edited the tests for
      test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns
      were off-by-three.  It should work on your out-of-tree testcases (and
      code, if you've followed the advice in the previous paragraph).
      
      Some of the tests are in badly named files now (e.g.,
      test/Assembler/invalid-mdcompositetype-missing-tag.ll should be
      'dicompositetype'); I'll come back and move the files in a follow-up
      commit.
      
      llvm-svn: 236120
      a9308c49
  2. Apr 23, 2015
  3. Apr 21, 2015
  4. Apr 18, 2015
  5. Apr 16, 2015
  6. Apr 14, 2015
  7. Apr 13, 2015
    • Duncan P. N. Exon Smith's avatar
      StripSymbols: Use DIGlobalVariable::getConstant() instead of getGlobal() · 7fa6629d
      Duncan P. N. Exon Smith authored
      The only difference between the two is a `dyn_cast<>` to
      `GlobalVariable`.  If optimizations have left anything behind when a
      global gets replaced, then it doesn't seem like the debug info is dead.
      
      I can't seem to find an optimization that would leave behind a
      non-`GlobalVariable` without nulling the reference entirely, so I
      haven't added a testcase (but I'll be deleting `getGlobal()` in a future
      commit).
      
      llvm-svn: 234792
      7fa6629d
  8. Apr 10, 2015
    • Benjamin Kramer's avatar
      [CallSite] Make construction from Value* (or Instruction*) explicit. · 3a09ef64
      Benjamin Kramer authored
      CallSite roughly behaves as a common base CallInst and InvokeInst. Bring
      the behavior closer to that model by making upcasts explicit. Downcasts
      remain implicit and work as before.
      
      Following dyn_cast as a mental model checking whether a Value *V isa
      CallSite now looks like this: 
        if (auto CS = CallSite(V)) // think dyn_cast
      instead of:
        if (CallSite CS = V)
      
      This is an extra token but I think it is slightly clearer. Making the
      ctor explicit has the advantage of not accidentally creating nullptr
      CallSites, e.g. when you pass a Value * to a function taking a CallSite
      argument.
      
      llvm-svn: 234601
      3a09ef64
  9. Apr 07, 2015
  10. Apr 06, 2015
  11. Apr 03, 2015
    • David Blaikie's avatar
      [opaque pointer type] More GEP API migrations in IRBuilder uses · 93c5444f
      David Blaikie authored
      The plan here is to push the API changes out from the common components
      (like Constant::getGetElementPtr and IRBuilder::CreateGEP related
      functions) and just update callers to either pass the type if it's
      obvious, or pass null.
      
      Do this with LoadInst as well and anything else that comes up, then to
      start porting specific uses to not pass null anymore - this may require
      some refactoring in each case.
      
      llvm-svn: 234042
      93c5444f
  12. Apr 02, 2015
    • David Blaikie's avatar
      [opaque pointer type] API migration for GEP constant factories · 4a2e73b0
      David Blaikie authored
      Require the pointee type to be passed explicitly and assert that it is
      correct. For now it's possible to pass nullptr here (and I've done so in
      a few places in this patch) but eventually that will be disallowed once
      all clients have been updated or removed. It'll be a long road to get
      all the way there... but if you have the cahnce to update your callers
      to pass the type explicitly without depending on a pointer's element
      type, that would be a good thing to do soon and a necessary thing to do
      eventually.
      
      llvm-svn: 233938
      4a2e73b0
  13. Mar 30, 2015
  14. Mar 27, 2015
  15. Mar 25, 2015
  16. Mar 24, 2015
    • Hans Wennborg's avatar
      Revert r233062 ""float2int": Add a new pass to demote from float to int where possible." · e42c6455
      Hans Wennborg authored
      This caused PR23008, compiles failing with: "Use still stuck around after Def is
      destroyed: %.sroa.speculated"
      
      Also reverting follow-up r233064.
      
      llvm-svn: 233105
      e42c6455
    • James Molloy's avatar
      "float2int": Add a new pass to demote from float to int where possible. · 408df516
      James Molloy authored
      It is possible to have code that converts from integer to float, performs operations then converts back, and the result is provably the same as if integers were used.
      
      This can come from different sources, but the most obvious is a helper function that uses floats but the arguments given at an inlined callsites are integers.
      
      This pass considers all integers requiring a bitwidth less than or equal to the bitwidth of the mantissa of a floating point type (23 for floats, 52 for doubles) as exactly representable in floating point.
      
      To reduce the risk of harming efficient code, the pass only attempts to perform complete removal of inttofp/fptoint operations, not just move them around.
      
      llvm-svn: 233062
      408df516
  17. Mar 23, 2015
  18. Mar 19, 2015
  19. Mar 17, 2015
  20. Mar 14, 2015
  21. Mar 12, 2015
  22. Mar 10, 2015
Loading