Skip to content
  1. Jan 22, 2013
  2. Jan 21, 2013
  3. Jan 20, 2013
  4. Jan 19, 2013
  5. Jan 18, 2013
  6. Jan 16, 2013
    • Eli Bendersky's avatar
      Remove unneeded include and empty line · da098573
      Eli Bendersky authored
      llvm-svn: 172642
      da098573
    • Kevin Enderby's avatar
      We want the dwarf AT_producer for assembly source files to match clang's · e82ada69
      Kevin Enderby authored
      AT_producer.  Which includes clang's version information so we can tell
      which version of the compiler was used.
      
      This is the first of two steps to allow us to do that.  This is the llvm-mc
      change to provide a method to set the AT_producer string.  The second step,
      coming soon to a clang near you, will have the clang driver pass the value
      of getClangFullVersion() via an flag when invoking the integrated assembler
      on assembly source files.
      
      rdar://12955296
      
      llvm-svn: 172630
      e82ada69
    • Peter Collingbourne's avatar
      Introduce llvm::sys::getProcessTriple() function. · a51c6ed6
      Peter Collingbourne authored
      In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
      as part of work to allow the user to supply a different default
      target triple at configure time.  This change also affected the JIT.
      However, it is inappropriate to use the default target triple in the
      JIT in most circumstances because this will not necessarily match
      the current architecture used by the process, leading to illegal
      instruction and other such errors at run time.
      
      Introduce the getProcessTriple() function for use in the JIT and
      its clients, and cause the JIT to use it.  On architectures with a
      single bitness, the host and process triples are identical.  On other
      architectures, the host triple represents the architecture of the
      host CPU, while the process triple represents the architecture used
      by the host CPU to interpret machine code within the current process.
      For example, when executing 32-bit code on a 64-bit Linux machine,
      the host triple may be 'x86_64-unknown-linux-gnu', while the process
      triple may be 'i386-unknown-linux-gnu'.
      
      This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
      platforms.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D254
      
      llvm-svn: 172627
      a51c6ed6
  7. Jan 15, 2013
  8. Jan 14, 2013
    • Eli Bendersky's avatar
      Expose an InitToTextSection through MCStreamer. · cbb2514d
      Eli Bendersky authored
      The aim of this patch is to fix the following piece of code in the
      platform-independent AsmParser:
      
      void AsmParser::CheckForValidSection() {
        if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) {
          TokError("expected section directive before assembly directive");
          Out.SwitchSection(Ctx.getMachOSection(
                              "__TEXT", "__text",
                              MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
                              0, SectionKind::getText()));
        }
      }
      
      This was added for the "-n" option of llvm-mc.
      
      The proposed fix adds another virtual method to MCStreamer, called
      InitToTextSection. Conceptually, it's similar to the existing
      InitSections which initializes all common sections and switches to
      text. The new method is implemented by each platform streamer in a way
      that it sees fit. So AsmParser can now do this:
      
      void AsmParser::CheckForValidSection() {
        if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) {
          TokError("expected section directive before assembly directive");
          Out.InitToTextSection();
        }
      }
      
      Which is much more reasonable.
      
      llvm-svn: 172450
      cbb2514d
  9. Jan 11, 2013
  10. Jan 10, 2013
  11. Jan 07, 2013
    • Eli Bendersky's avatar
      Add the align_to_end option to .bundle_lock in the MC implementation of aligned · 802b6287
      Eli Bendersky authored
      bundling. The document describing this feature and the implementation has also
      been updated:
      
      https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm
      
      llvm-svn: 171797
      802b6287
    • Chandler Carruth's avatar
      Move CallGraphSCCPass.h into the Analysis tree; that's where the · 839a98e6
      Chandler Carruth authored
      implementation lives already.
      
      llvm-svn: 171746
      839a98e6
    • Chandler Carruth's avatar
      Switch TargetTransformInfo from an immutable analysis pass that requires · 664e354d
      Chandler Carruth authored
      a TargetMachine to construct (and thus isn't always available), to an
      analysis group that supports layered implementations much like
      AliasAnalysis does. This is a pretty massive change, with a few parts
      that I was unable to easily separate (sorry), so I'll walk through it.
      
      The first step of this conversion was to make TargetTransformInfo an
      analysis group, and to sink the nonce implementations in
      ScalarTargetTransformInfo and VectorTargetTranformInfo into
      a NoTargetTransformInfo pass. This allows other passes to add a hard
      requirement on TTI, and assume they will always get at least on
      implementation.
      
      The TargetTransformInfo analysis group leverages the delegation chaining
      trick that AliasAnalysis uses, where the base class for the analysis
      group delegates to the previous analysis *pass*, allowing all but tho
      NoFoo analysis passes to only implement the parts of the interfaces they
      support. It also introduces a new trick where each pass in the group
      retains a pointer to the top-most pass that has been initialized. This
      allows passes to implement one API in terms of another API and benefit
      when some other pass above them in the stack has more precise results
      for the second API.
      
      The second step of this conversion is to create a pass that implements
      the TargetTransformInfo analysis using the target-independent
      abstractions in the code generator. This replaces the
      ScalarTargetTransformImpl and VectorTargetTransformImpl classes in
      lib/Target with a single pass in lib/CodeGen called
      BasicTargetTransformInfo. This class actually provides most of the TTI
      functionality, basing it upon the TargetLowering abstraction and other
      information in the target independent code generator.
      
      The third step of the conversion adds support to all TargetMachines to
      register custom analysis passes. This allows building those passes with
      access to TargetLowering or other target-specific classes, and it also
      allows each target to customize the set of analysis passes desired in
      the pass manager. The baseline LLVMTargetMachine implements this
      interface to add the BasicTTI pass to the pass manager, and all of the
      tools that want to support target-aware TTI passes call this routine on
      whatever target machine they end up with to add the appropriate passes.
      
      The fourth step of the conversion created target-specific TTI analysis
      passes for the X86 and ARM backends. These passes contain the custom
      logic that was previously in their extensions of the
      ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces.
      I separated them into their own file, as now all of the interface bits
      are private and they just expose a function to create the pass itself.
      Then I extended these target machines to set up a custom set of analysis
      passes, first adding BasicTTI as a fallback, and then adding their
      customized TTI implementations.
      
      The fourth step required logic that was shared between the target
      independent layer and the specific targets to move to a different
      interface, as they no longer derive from each other. As a consequence,
      a helper functions were added to TargetLowering representing the common
      logic needed both in the target implementation and the codegen
      implementation of the TTI pass. While technically this is the only
      change that could have been committed separately, it would have been
      a nightmare to extract.
      
      The final step of the conversion was just to delete all the old
      boilerplate. This got rid of the ScalarTargetTransformInfo and
      VectorTargetTransformInfo classes, all of the support in all of the
      targets for producing instances of them, and all of the support in the
      tools for manually constructing a pass based around them.
      
      Now that TTI is a relatively normal analysis group, two things become
      straightforward. First, we can sink it into lib/Analysis which is a more
      natural layer for it to live. Second, clients of this interface can
      depend on it *always* being available which will simplify their code and
      behavior. These (and other) simplifications will follow in subsequent
      commits, this one is clearly big enough.
      
      Finally, I'm very aware that much of the comments and documentation
      needs to be updated. As soon as I had this working, and plausibly well
      commented, I wanted to get it committed and in front of the build bots.
      I'll be doing a few passes over documentation later if it sticks.
      
      Commits to update DragonEgg and Clang will be made presently.
      
      llvm-svn: 171681
      664e354d
  12. Jan 06, 2013
  13. Jan 05, 2013
    • Chandler Carruth's avatar
      Fix another place where we build the TTI pass to the new interface. · 441c2ac9
      Chandler Carruth authored
      Sorry for the noise here, 'make check' doesn't build this code. =/
      
      llvm-svn: 171623
      441c2ac9
    • Chandler Carruth's avatar
      Convert the TargetTransformInfo from an immutable pass with dynamic · 539edf4e
      Chandler Carruth authored
      interfaces which could be extracted from it, and must be provided on
      construction, to a chained analysis group.
      
      The end goal here is that TTI works much like AA -- there is a baseline
      "no-op" and target independent pass which is in the group, and each
      target can expose a target-specific pass in the group. These passes will
      naturally chain allowing each target-specific pass to delegate to the
      generic pass as needed.
      
      In particular, this will allow a much simpler interface for passes that
      would like to use TTI -- they can have a hard dependency on TTI and it
      will just be satisfied by the stub implementation when that is all that
      is available.
      
      This patch is a WIP however. In particular, the "stub" pass is actually
      the one and only pass, and everything there is implemented by delegating
      to the target-provided interfaces. As a consequence the tools still have
      to explicitly construct the pass. Switching targets to provide custom
      passes and sinking the stub behavior into the NoTTI pass is the next
      step.
      
      llvm-svn: 171621
      539edf4e
  14. Jan 02, 2013
    • Chandler Carruth's avatar
      Move all of the header files which are involved in modelling the LLVM IR · 9fb823bb
      Chandler Carruth authored
      into their new header subdirectory: include/llvm/IR. This matches the
      directory structure of lib, and begins to correct a long standing point
      of file layout clutter in LLVM.
      
      There are still more header files to move here, but I wanted to handle
      them in separate commits to make tracking what files make sense at each
      layer easier.
      
      The only really questionable files here are the target intrinsic
      tablegen files. But that's a battle I'd rather not fight today.
      
      I've updated both CMake and Makefile build systems (I think, and my
      tests think, but I may have missed something).
      
      I've also re-sorted the includes throughout the project. I'll be
      committing updates to Clang, DragonEgg, and Polly momentarily.
      
      llvm-svn: 171366
      9fb823bb
    • Chandler Carruth's avatar
      b034cb77
  15. Jan 01, 2013
  16. Dec 31, 2012
  17. Dec 21, 2012
    • Rafael Espindola's avatar
      Add a function to get the segment name of a section. · a9f810b6
      Rafael Espindola authored
      On MachO, sections also have segment names. When a tool looking at a .o file
      prints a segment name, this is what they mean. In reality, a .o has only one
      anonymous, segment.
      
      This patch adds a MachO only function to fetch that segment name. I named it
      getSectionFinalSegmentName since the main use for the name seems to be inform
      the linker with segment this section should go to.
      
      The patch also changes MachOObjectFile::getSectionName to return just the
      section name instead of computing SegmentName,SectionName.
      
      The main difference from the previous patch is that it doesn't use
      InMemoryStruct. It is extremely dangerous: if the endians match it returns
      a pointer to the file buffer, if not, it returns a pointer to an internal buffer
      that is overwritten in the next API call.
      
      We should change all of this code to use
      support::detail::packed_endian_specific_integral like ELF, but since these
      functions only handle strings, they work with big and little endian machines
      as is.
      
      I have tested this by installing ubuntu 12.10 ppc on qemu, that is why it took
      so long :-)
      
      llvm-svn: 170838
      a9f810b6
  18. Dec 20, 2012
  19. Dec 19, 2012
    • Roman Divacky's avatar
      Remove edis - the enhanced disassembler. Fixes PR14654. · e3d32305
      Roman Divacky authored
      llvm-svn: 170578
      e3d32305
    • Rafael Espindola's avatar
      Revert 170545 while I debug the ppc failures. · 0f00de40
      Rafael Espindola authored
      llvm-svn: 170547
      0f00de40
    • Rafael Espindola's avatar
      Add r170095 back. · aa7b2780
      Rafael Espindola authored
      I cannot reproduce it the failures locally, so I will keep an eye at the ppc
      bots. This patch does add the change to the "Disassembly of section" message,
      but that is not what was failing on the bots.
      
      Original message:
      
      Add a funciton to get the segment name of a section.
      
      On MachO, sections also have segment names. When a tool looking at a .o file
      prints a segment name, this is what they mean. In reality, a .o has only one
      anonymous, segment.
      
      This patch adds a MachO only function to fetch that segment name. I named it
      getSectionFinalSegmentName since the main use for the name seems to be infor
      the linker with segment this section should go to.
      
      The patch also changes MachOObjectFile::getSectionName to return just the
      section name instead of computing SegmentName,SectionName.
      
      llvm-svn: 170545
      aa7b2780
Loading