Skip to content
  1. Jan 21, 2014
  2. Jan 20, 2014
    • Hal Finkel's avatar
      Update StackProtector when coloring merges stack slots · a69e5b8b
      Hal Finkel authored
      StackProtector keeps a ValueMap of alloca instructions to layout kind tags for
      use by PEI and other later passes. When stack coloring replaces one alloca with
      a bitcast to another one, the key replacement in this map does not work.
      Instead, provide an interface to manage this updating directly. This seems like
      an improvement over the old behavior, where the layout map would not get
      updated at all when the stack slots were merged. In practice, however, there is
      likely no observable difference because PEI only did anything special with
      'large array' kinds, and if one large array is merged with another, than the
      replacement should already have been a large array.
      
      This is an attempt to unbreak the clang-x86_64-darwin11-RA builder.
      
      llvm-svn: 199684
      a69e5b8b
    • David Woodhouse's avatar
      [x86] Support i386-*-*-code16 triple for emitting 16-bit code · 71d15eda
      David Woodhouse authored
      llvm-svn: 199648
      71d15eda
    • Chandler Carruth's avatar
      [PM] Wire up the Verifier for the new pass manager and connect it to the · 4d35631a
      Chandler Carruth authored
      various opt verifier commandline options.
      
      Mostly mechanical wiring of the verifier to the new pass manager.
      Exercises one of the more unusual aspects of it -- a pass can be either
      a module or function pass interchangably. If this is ever problematic,
      we can make things more constrained, but for things like the verifier
      where there is an "obvious" applicability at both levels, it seems
      convenient.
      
      This is the next-to-last piece of basic functionality left to make the
      opt commandline driving of the new pass manager minimally functional for
      testing and further development. There is still a lot to be done there
      (notably the factoring into .def files to kill the current boilerplate
      code) but it is relatively uninteresting. The only interesting bit left
      for minimal functionality is supporting the registration of analyses.
      I'm planning on doing that on top of the .def file switch mostly because
      the boilerplate for the analyses would be significantly worse.
      
      llvm-svn: 199646
      4d35631a
    • Kai Nacke's avatar
      ARM: add tlsldo relocation · e51c8138
      Kai Nacke authored
      Add support for the symbol(tlsldo) relocation. This is required in order to 
      solve PR18554.
      
      Reviewed by R. Golin, A. Korobeynikov.
      
      llvm-svn: 199644
      e51c8138
    • Artyom Skrobov's avatar
      [ARM] Do not generate Tag_DIV_use=AllowDIVExt when hardware div is... · 10e76a4e
      Artyom Skrobov authored
      [ARM] Do not generate Tag_DIV_use=AllowDIVExt when hardware div is non-optional: it should have the default value of AllowDIVIfExists
      
      llvm-svn: 199638
      10e76a4e
    • Saleem Abdulrasool's avatar
      MC: whitespace · 4cbdbaf7
      Saleem Abdulrasool authored
      Remove hard tabs in favour of spaces.  NFC.
      
      llvm-svn: 199624
      4cbdbaf7
    • Chandler Carruth's avatar
      [PM] Fix a contradiction in the comments noticed by Anders. · 81fdde5d
      Chandler Carruth authored
      Have I mentioned that functions returning true on error and false on
      success are confusing? They're more confusing when their name is
      "verify". Anyways...
      
      llvm-svn: 199622
      81fdde5d
  3. Jan 19, 2014
    • Michael Gottesman's avatar
      [APInt] Fix nearestLogBase2 to return correct answers for very large APInt and... · 84fcbdea
      Michael Gottesman authored
      [APInt] Fix nearestLogBase2 to return correct answers for very large APInt and APInt with a bitwidth of 1.
      
      I also improved the comments, added some more tests, etc.
      
      llvm-svn: 199610
      84fcbdea
    • Michael Gottesman's avatar
      [APInt] Fixed bug where APInt(UINT32_MAX, 0) would blow up when being constructed. · 073af74e
      Michael Gottesman authored
      This was due to arithmetic overflow in the getNumBits() computation. Now we
      cast BitWidth to a uint64_t so that does not occur during the computation. After
      the computation is complete, the uint64_t is truncated when the function
      returns.
      
      I know that this is not something that is likely to happen, but it *IS* a valid
      input and we should not blow up.
      
      llvm-svn: 199609
      073af74e
    • Saleem Abdulrasool's avatar
      ARM: update build attributes for ABI r2.09 · 196c3212
      Saleem Abdulrasool authored
      Update names for the names as per the current ABI errata.  Mark deprecated tags
      as such.
      
      llvm-svn: 199576
      196c3212
    • Saleem Abdulrasool's avatar
      Move ARM build attributes into Support · 278a9f43
      Saleem Abdulrasool authored
      This moves the ARM build attributes definitions and support routines into the
      Support library.  The support routines simply permit the conversion of the value
      to and from a string representation.
      
      The movement is prompted in order to permit access to the constants and string
      representations from readobj in order to facilitate decoding of the attributes
      section.
      
      llvm-svn: 199575
      278a9f43
    • Chandler Carruth's avatar
      [PM] Make the verifier work independently of any pass manager. · 043949d4
      Chandler Carruth authored
      This makes the 'verifyFunction' and 'verifyModule' functions totally
      independent operations on the LLVM IR. It also cleans up their API a bit
      by lifting the abort behavior into their clients and just using an
      optional raw_ostream parameter to control printing.
      
      The implementation of the verifier is now just an InstVisitor with no
      multiple inheritance. It also is significantly more const-correct, and
      hides the const violations internally. The two layers that force us to
      break const correctness are building a DomTree and dispatching through
      the InstVisitor.
      
      A new VerifierPass is used to implement the legacy pass manager
      interface in terms of the other pieces.
      
      The error messages produced may be slightly different now, and we may
      have slightly different short circuiting behavior with different usage
      models of the verifier, but generally everything works equivalently and
      this unblocks wiring the verifier up to the new pass manager.
      
      llvm-svn: 199569
      043949d4
    • Chandler Carruth's avatar
      Add a const lookup routine to get a BlockAddress constant if there is · 6a93692a
      Chandler Carruth authored
      one, but not create one. This is useful in the verifier when we want to
      query the constant if it exists but not create one. To be used in an
      upcoming commit.
      
      llvm-svn: 199568
      6a93692a
  4. Jan 18, 2014
  5. Jan 17, 2014
    • Justin Bogner's avatar
      MC: Add some missing include guards · 2b164bd9
      Justin Bogner authored
      Patch by Daniel Reynaud!
      
      llvm-svn: 199523
      2b164bd9
    • Rui Ueyama's avatar
      llvm-objdump/COFF: Print ordinal base number. · e5df6095
      Rui Ueyama authored
      llvm-svn: 199518
      e5df6095
    • Juergen Ributzka's avatar
      Add two new calling conventions for runtime calls · e6250130
      Juergen Ributzka authored
      This patch adds two new target-independent calling conventions for runtime
      calls - PreserveMost and PreserveAll.
      The target-specific implementation for X86-64 is defined as following:
        - Arguments are passed as for the default C calling convention
        - The same applies for the return value(s)
        - PreserveMost preserves all GPRs - except R11
        - PreserveAll preserves all GPRs and all XMMs/YMMs - except R11
      
      Reviewed by Lang and Philip
      
      llvm-svn: 199508
      e6250130
    • Chandler Carruth's avatar
      [PM] [cleanup] Rename some of the Verifier's members, re-arrange them, · bf2b652c
      Chandler Carruth authored
      and tweak comments prior to more invasive surgery. Also clean up some
      other non-doxygen comments, and run clang-format over the parts that are
      going to change dramatically in subsequent commits so that those don't
      get cluttered with formatting changes.
      
      No functionality changed.
      
      llvm-svn: 199489
      bf2b652c
    • Chandler Carruth's avatar
      [PM] Remove the preverifier and directly compute the DominatorTree for · 7677760e
      Chandler Carruth authored
      the verifier after ensuring the CFG is at least usefully formed.
      
      This fixes a number of problems:
      1) The PreVerifier was missing the controls the Verifier provides over
         *how* an invalid module is handled -- it just aborted the program!
         Now it uses the same logic as the Verifier which is significantly
         more library-friendly.
      2) The DominatorTree used previously could have been cached and not
         updated due to bugs in prior passes and we would silently use the
         stale tree. This could cause dominance errors to not be as quickly
         diagnosed.
      3) We can now (in the next patch) pull the functionality of the verifier
         apart from the pass infrastructure so that you can verify IR without
         having any form of pass manager. This in turn frees the code to share
         logic between old and new pass manager variants.
      
      Along the way I fixed at least one annoying bug -- the state for
      'Broken' wasn't being cleared from run to run causing all functions
      visited after the first broken function to be marked as broken
      regardless of whether *they* were a problem. Fortunately, I don't really
      know much of a way to observe this peculiarity.
      
      In case folks are worried about the runtime cost, its negligible.
      I looked at running the entire regression test suite (which should be
      a relatively good use of the verifier) before and after but was unable
      to even measure the time spent on the verifier and there was no
      regresion from before to after. I checked both with debug builds and
      optimized builds.
      
      llvm-svn: 199487
      7677760e
    • Rafael Espindola's avatar
      Use LLVM_EXPLICIT instead of a function pointer as bool. · 98d3c101
      Rafael Espindola authored
      llvm-svn: 199437
      98d3c101
  6. Jan 16, 2014
    • Quentin Colombet's avatar
      [opt][PassInfo] Allow opt to run passes that need target machine. · dc0b2ea2
      Quentin Colombet authored
      When registering a pass, a pass can now specify a second construct that takes as
      argument a pointer to TargetMachine.
      The PassInfo class has been updated to reflect that possibility.
      If such a constructor exists opt will use it instead of the default constructor
      when instantiating the pass.
      
      Since such IR passes are supposed to be rare, no specific support has been
      added to this commit to allow an easy registration of such a pass.
      In other words, for such pass, the initialization function has to be
      hand-written (see CodeGenPrepare for instance).
      
      Now, codegenprepare can be tested using opt:
      opt -codegenprepare -mtriple=mytriple input.ll
      
      llvm-svn: 199430
      dc0b2ea2
    • Duncan P. N. Exon Smith's avatar
      LTO: document LTO_API_VERSION for each API · 40fdf5fe
      Duncan P. N. Exon Smith authored
      Adding a doxygen comment for each bit of API to indicate at which
      LTO_API_VERSION each was available, manually gleaned from successive
      git-blames.  A few notes:
      
      - LTO_API_VERSION was set to 3 at its introduction.
      - I've indicated all the API introduced before LTO_API_VERSION was
        around as available "prior to LTO_API_VERSION=3".
      - A number of API changes neglected to bump LTO_API_VERSION.  These I've
        indicated as available at the *next* bump of LTO_API_VERSION.
      
      llvm-svn: 199429
      40fdf5fe
    • Rui Ueyama's avatar
      llvm-objdump/COFF: Print DLL name in the export table header. · da49d0d4
      Rui Ueyama authored
      llvm-svn: 199422
      da49d0d4
    • Rafael Espindola's avatar
    • Evgeniy Stepanov's avatar
      [asan] Remove -fsanitize-address-zero-base-shadow command line · 13665367
      Evgeniy Stepanov authored
      flag from clang, and disable zero-base shadow support on all platforms
      where it is not the default behavior.
      
      - It is completely unused, as far as we know.
      - It is ABI-incompatible with non-zero-base shadow, which means all
      objects in a process must be built with the same setting. Failing to
      do so results in a segmentation fault at runtime.
      - It introduces a backward dependency of compiler-rt on user code,
      which is uncommon and complicates testing.
      
      This is the LLVM part of a larger change.
      
      llvm-svn: 199371
      13665367
    • Rui Ueyama's avatar
      llmv-objdump/COFF: Print export table contents. · ad882ba8
      Rui Ueyama authored
      This patch adds the capability to dump export table contents. An example
      output is this:
      
        Export Table:
         Ordinal      RVA  Name
               5   0x2008  exportfn1
               6   0x2010  exportfn2
      
      By adding this feature to llvm-objdump, we will be able to use it to check
      export table contents in LLD's tests. Currently we are doing binary
      comparison in the tests, which is fragile and not readable to humans.
      
      llvm-svn: 199358
      ad882ba8
    • Rafael Espindola's avatar
      CommentColumn is always 40. Simplify. · f69b850d
      Rafael Espindola authored
      llvm-svn: 199357
      f69b850d
    • Rui Ueyama's avatar
      Don't use DataRefImpl to implement ImportDirectoryEntryRef. · a045b73a
      Rui Ueyama authored
      DataRefImpl (a union of two integers and a pointer) is not the ideal data type
      to represent a reference to an import directory entity. We should just use the
      pointer to the import table and an offset instead to simplify. No functionality
      change.
      
      llvm-svn: 199349
      a045b73a
    • Manman Ren's avatar
      Report a warning when dropping outdated debug info metadata. · 2ebfb42f
      Manman Ren authored
      Use DiagnosticInfo to emit the warning.
      
      llvm-svn: 199346
      2ebfb42f
  7. Jan 15, 2014
    • David Peixotto's avatar
      Fix parsing of .symver directive on ARM · c0f92a2d
      David Peixotto authored
      ARM assembly syntax uses @ for a comment, execpt for the second
      parameter of the .symver directive which requires @ as part of the
      symbol name. This commit fixes the parsing of this directive by
      adding a special case for ARM for this one argumnet.
      
      To make the change we had to move the AllowAtInIdentifier variable
      to the MCAsmLexer interface (from AsmLexer) and expose a setter for
      the value.  The ELFAsmParser then toggles this value when parsing
      the second argument to the .symver directive for a target that
      uses @ as a comment symbol
      
      llvm-svn: 199339
      c0f92a2d
    • Quentin Colombet's avatar
      [LTO] Add a hook to map LLVM diagnostics into the clients of LTO. · 5fa1f6f5
      Quentin Colombet authored
      Add a hook in the C API of LTO so that clients of the code generator can set
      their own handler for the LLVM diagnostics.
      The handler is defined like this:
      typedef void (*lto_diagnostic_handler_t)(lto_codegen_diagnostic_severity_t
      severity, const char *diag, void *ctxt)
      - severity says how bad this is.
      - diag is a string that contains the diagnostic message.
      - ctxt is the registered context for this handler.
      
      This hook is more general than the lto_get_error_message, since this function
      keeps only the latest message and can only be queried when something went wrong
      (no warning for instance).
      
      <rdar://problem/15517596>
      
      llvm-svn: 199338
      5fa1f6f5
    • Bob Wilson's avatar
      Remove support for armv7f slice. <rdar://problem/12478440> · f8d5da6e
      Bob Wilson authored
      This was never used for anything so we should just get rid of it.
      
      llvm-svn: 199337
      f8d5da6e
Loading