Skip to content
  1. Jan 16, 2014
    • Tim Northover's avatar
      ReMat: fix overly cavalier attitude to sub-register indices · 3657cb03
      Tim Northover authored
      There are two attempted optimisations in reMaterializeTrivialDef, trying to
      avoid promoting the size of a register too much when rematerializing.
      Unfortunately, both appear to be flawed. First, we see if the original register
      would have worked, but this is inadequate. Consider:
      
          v1 = SOMETHING (v1 is QQ)
          v2:Q0 = COPY v1:Q1 (v1, v2 are QQ)
          ...
          uses of v2
      
      In this case even though v2 *could* be used directly as the output of
      SOMETHING, this would set the wrong bits of the QQ register involved. The
      correct rematerialization must be:
      
          v2:Q0_Q1 = SOMETHING (v2 promoted to QQQ)
          ...
          uses of v2:Q1_Q2
      
      For the second optimisation, if the correct remat is "v2:idx = SOMETHING" then
      we can't necessarily expect v2 itself to be valid for SOMETHING, but we do try
      to hunt for a class between v1 and v2 that works. Unfortunately, this is also
      wrong:
      
          v1 = SOMETHING (v1 is QQ)
          v2:Q0_Q1 = COPY v1 (v1 is QQ, v2 is QQQ)
          ...
          uses of v2 as a QQQ
      
      The canonical rematerialization here is "v2:Q0_Q1 = SOMETHING". However current
      logic would decide that v2 could be a QQ (no interest is taken in later uses).
      
      This patch, therefore, always accepts the widened register class without trying
      to be clever. Generally there is no penalty to this (e.g. in the common GR32 <
      GR64 case, expanding the width doesn't matter because it's not like you were
      going to do anything else with the high bits of a GR32 register). It can
      increase register pressure in cases like the ARM VFP regs though (multiple
      non-overlapping but equivalent subregisters). This situation can be
      spotted by the fact that both source and destination in the
      not-quite-coalesced pair have a sub-register index and
      rematerialisation is skipped in that situation.
      
      Unfortunately, no in-tree targets actually expose this as far as I can tell
      (there are so few isAsCheapAsAMove instructions for it to trigger on) so I've
      been unable to produce a test. It was exposed in our ARM64 SPEC tests though,
      and I will be adding a test there that we should be able to contribute
      soon(TM).
      
      rdar://problem/15775279
      
      llvm-svn: 199376
      3657cb03
    • 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
    • Jiangning Liu's avatar
      4df2363a
    • Elena Demikhovsky's avatar
      AVX-512: fixed a compare pattern · d1487261
      Elena Demikhovsky authored
      llvm-svn: 199366
      d1487261
    • Craig Topper's avatar
      Copy segment register when optimizing to MOV8ao8/MOV16ao16/MOV32ao32. · a9d2c67c
      Craig Topper authored
      llvm-svn: 199365
      a9d2c67c
    • Craig Topper's avatar
      Allow x86 mov instructions to/from memory with absolute address to be encoded... · 35da3d19
      Craig Topper authored
      Allow x86 mov instructions to/from memory with absolute address to be encoded and disassembled with a segment override prefix. Fixes PR16962.
      
      llvm-svn: 199364
      35da3d19
    • Rafael Espindola's avatar
      Use a slightly smaller hack. · 74c3e631
      Rafael Espindola authored
      llvm-svn: 199363
      74c3e631
    • 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
    • Bill Wendling's avatar
      Reapply r194218 with fix: · 91686d6d
      Bill Wendling authored
      Move copying of global initializers below the cloning of functions.
      
      The BlockAddress doesn't have access to the correct basic blocks until the
      functions have been cloned. This causes the BlockAddress to point to the old
      values. Just wait until the functions have been cloned before copying the
      initializers.
      PR13163
      
      llvm-svn: 199354
      91686d6d
    • Craig Topper's avatar
      Remove use of OpSize for populating VEX_PP field. A prefix encoding is now... · 8a60fff2
      Craig Topper authored
      Remove use of OpSize for populating VEX_PP field. A prefix encoding is now used instead. Simplify some other code. No functional changes intended.
      
      llvm-svn: 199353
      8a60fff2
    • Rafael Espindola's avatar
      Attempt to fix the MSVC build. · 098000eb
      Rafael Espindola authored
      llvm-svn: 199352
      098000eb
    • Arnold Schwaighofer's avatar
      BasicAA: We need to check both access sizes when comparing a gep and an · e3ac0997
      Arnold Schwaighofer authored
      underlying object of unknown size.
      
      Fixes PR18460.
      
      llvm-svn: 199351
      e3ac0997
    • Rafael Espindola's avatar
      Prevent calls to __jit_debug_register_code from being optimized out. · c3d68766
      Rafael Espindola authored
      Patch by Andrew MacPherson. I just tweaked the comment.
      
      llvm-svn: 199350
      c3d68766
    • 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
    • Reed Kotler's avatar
      Adjust offsets for max load instruction offsets. This is more pessimistic · 43788a20
      Reed Kotler authored
      than it needs to be by 1 bit but I need to finish some other things so 
      that all the boundary cases will work in that situation. constpool.c
      in test-suite will fail to assemble under our new internal test-suite sync
      without this change.
      
      llvm-svn: 199343
      43788a20
  2. Jan 15, 2014
  3. Jan 14, 2014
    • Tim Northover's avatar
      ARM: correctly determine final tBX_LR in Thumb1 functions · 463a5f24
      Tim Northover authored
      The changes caused by folding an sp-adjustment into a "pop" previously
      disrupted the forward search for the final real instruction in a
      terminating block. This switches to a backward search (skipping debug
      instrs).
      
      This fixes PR18399.
      
      Patch by Zhaoshi.
      
      llvm-svn: 199266
      463a5f24
Loading