Skip to content
  1. Apr 28, 2013
  2. Apr 27, 2013
    • Ulrich Weigand's avatar
      · e037a492
      Ulrich Weigand authored
      Handle tied sub-operands in AsmMatcherEmitter
      
      The problem this patch addresses is the handling of register tie
      constraints in AsmMatcherEmitter, where one operand is tied to a
      sub-operand of another operand.  The typical scenario for this to
      happen is the tie between the "write-back" register of a pre-inc
      instruction, and the base register sub-operand of the memory address
      operand of that instruction.
      
      The current AsmMatcherEmitter code attempts to handle tied
      operands by emitting the operand as usual first, and emitting
      a CVT_Tied node when handling the second (tied) operand.  However,
      this really only works correctly if the tied operand does not
      have sub-operands (and isn't a sub-operand itself).  Under those
      circumstances, a wrong MC operand list is generated.
      
      In discussions with Jim Grosbach, it turned out that the MC operand
      list really ought not to contain tied operands in the first place;
      instead, it ought to consist of exactly those operands that are
      named in the AsmString.  However, getting there requires significant
      rework of (some) targets.
      
      This patch fixes the immediate problem, and at the same time makes
      one (small) step in the direction of the long-term solution, by
      implementing two changes:
      
      1. Restricts the AsmMatcherEmitter handling of tied operands to
         apply solely to simple operands (not complex operands or
         sub-operand of such).
      
      This means that at least we don't get silently corrupt MC operand
      lists as output.  However, if we do have tied sub-operands, they
      would now no longer be handled at all, except for:
      
      2. If we have an operand that does not occur in the AsmString,
         and also isn't handled as tied operand, simply emit a dummy
         MC operand (constant 0).
      
      This works as long as target code never attempts to access
      MC operands that do no not occur in the AsmString (and are
      not tied simple operands), which happens to be the case for
      all targets where this situation can occur (ARM and PowerPC).
      
      [ Note that this change means that many of the ARM custom
        converters are now superfluous, since the implement the
        same "hack" now performed already by common code. ]
      
      Longer term, we ought to fix targets to never access *any*
      MC operand that does not occur in the AsmString (including
      tied simple operands), and then finally completely remove
      all such operands from the MC operand list.
      
      Patch approved by Jim Grosbach.
      
      llvm-svn: 180677
      e037a492
    • Shuxin Yang's avatar
      Fix a XOR reassociation bug. · 04a4fd43
      Shuxin Yang authored
      When Reassociator optimize "(x | C1)" ^ "(X & C2)", it may swap the two
      subexpressions, however, it forgot to swap cached constants (of C1 and C2)
      accordingly.
      
      rdar://13739160
      
      llvm-svn: 180676
      04a4fd43
    • Dmitri Gribenko's avatar
      Documentation: end option description with a period · 7d8b607f
      Dmitri Gribenko authored
      Patch by Dimitry Andric.
      
      llvm-svn: 180675
      7d8b607f
    • Tim Northover's avatar
      AArch64: convert MC-layer test to .s file · 72e12260
      Tim Northover authored
      The CodeGen aspects of this test are already covered by cfi-frame.ll;
      making it an assembly file reduces the risk of incidental changes
      affecting the test.
      
      llvm-svn: 180671
      72e12260
    • Michael Gottesman's avatar
      [objc-arc] Test cleanups. · b33b6cb8
      Michael Gottesman authored
      Mainly adding paranoid checks for the closing brace of a function to
      help with FileCheck error readability. Also some other minor changes.
      
      No actual CHECK changes.
      
      llvm-svn: 180668
      b33b6cb8
    • Andrew Trick's avatar
      Generalize the MachineTraceMetrics public API. · 85058af6
      Andrew Trick authored
      Naturally, we should be able to pass in extra instructions, not just
      extra blocks.
      
      llvm-svn: 180667
      85058af6
    • Andrew Trick's avatar
      Add target flags to MachineMemOperands. · bcda4313
      Andrew Trick authored
      This seems to me an obvious place to allow target passes to annotate
      memory operations. There are plenty of bits, and I'm not aware of
      another good way for early target passes to propagate hints along to
      later passes. Target independent transforms can simply preserve them,
      the way they preserve the other flags. Like MachineMemOperands in
      general, if the target flags are lost we must still generate correct
      code.
      
      This has lots of uses, but I want this flexibility now to make it
      easier to work with the new MachineTraceMetrics
      analysis. MachineTraceMetrics can gather a lot of information about
      instructions based on the surrounding code. This information can be
      used to influence postRA machine passes that don't work on SSA form.
      
      llvm-svn: 180666
      bcda4313
    • Andrew Trick's avatar
      whitespace · 94c08a7b
      Andrew Trick authored
      llvm-svn: 180665
      94c08a7b
    • Eric Christopher's avatar
      Use the target triple from the target machine rather than the module · 203e12bf
      Eric Christopher authored
      to determine whether or not we're on a darwin platform for debug code
      emitting.
      
      Solves the problem of a module with no triple on the command line
      and no triple in the module using non-gdb ok features on darwin. Fix
      up the member-pointers test to check the correct things for cross
      platform (DW_FORM_flag is a good prefix).
      
      Unfortunately no testcase because I have no ideas how to test something
      without a triple and without a triple in the module yet check
      precisely on two platforms. Ideas welcome.
      
      llvm-svn: 180660
      203e12bf
    • Eric Christopher's avatar
      Move the XFAIL out of the middle of a comment. · b2a602d7
      Eric Christopher authored
      llvm-svn: 180659
      b2a602d7
    • Rafael Espindola's avatar
      Make all darwin ppc stubs local. · 1357ab74
      Rafael Espindola authored
      This fixes pr15763.
      Patch by David Fang.
      
      llvm-svn: 180657
      1357ab74
    • Manman Ren's avatar
      Struct-path aware TBAA: change the format of TBAAStructType node. · 5c37106d
      Manman Ren authored
      We switch the order of offset and field type to make TBAAStructType node
      (name, parent node, offset) similar to scalar TBAA node (name, parent node).
      TypeIsImmutable is added to TBAAStructTag node.
      
      llvm-svn: 180654
      5c37106d
  3. Apr 26, 2013
    • Adrian Prantl's avatar
      Cleanup and document MachineLocation. · d4c0dd47
      Adrian Prantl authored
      Clarify documentation and API to make the difference between register and
      register-indirect addressed locations more explicit. Put in a comment
      to point out that with the current implementation we cannot specify
      a register-indirect location with offset 0 (a breg 0 in DWARF).
      No functionality change intended.
      
      rdar://problem/13658587
      
      llvm-svn: 180641
      d4c0dd47
    • Bill Wendling's avatar
      Micro-optimization · 55a9c97c
      Bill Wendling authored
      TLVs probably won't be as common as the other types of variables. Check for them
      last before defaulting to "DATA".
      
      llvm-svn: 180631
      55a9c97c
    • Benjamin Kramer's avatar
      Make CHECK lines a bit less strict so they also match code generated for win64. · 5259bbde
      Benjamin Kramer authored
      Hopefully brings the windows buildbots back to life.
      
      llvm-svn: 180630
      5259bbde
    • Nadav Rotem's avatar
      Teach the interpreter to handle vector compares and additional vector arithmetic operations. · be0e89d9
      Nadav Rotem authored
      Patch by Yuri Veselov.
      
      llvm-svn: 180626
      be0e89d9
    • Rafael Espindola's avatar
      Use llvm/Object/MachO.h in macho-dumper. Drop the old macho parser. · 6e040c0b
      Rafael Espindola authored
      For Mach-O there were 2 implementations for parsing object files. A
      standalone llvm/Object/MachOObject.h and llvm/Object/MachO.h which
      implements the generic interface in llvm/Object/ObjectFile.h.
      
      This patch adds the missing features to MachO.h, moves macho-dump to
      use MachO.h and removes ObjectFile.h.
      
      In addition to making sure that check-all is clean, I checked that the
      new version produces exactly the same output in all Mach-O files in a
      llvm+clang build directory (including executables and shared
      libraries).
      
      To test the performance, I ran macho-dump over all the files in a
      llvm+clang build directory again, but this time redirecting the output
      to /dev/null. Both the old and new versions take about 4.6 seconds
      (2.5 user) to finish.
      
      llvm-svn: 180624
      6e040c0b
    • Rafael Espindola's avatar
      The exception demo needs its symbols exported. · 03ee04be
      Rafael Espindola authored
      llvm-svn: 180622
      03ee04be
    • Tom Stellard's avatar
      R600: Initialize AMDGPUMachineFunction::ShaderType to ShaderType::COMPUTE · 456adc6c
      Tom Stellard authored
      
      
      We need to intialize this to something and since clang does not set
      the shader type attribute and clang is used only for compute shaders,
      initializing it to COMPUTE seems like the best choice.
      
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      llvm-svn: 180620
      456adc6c
    • Adrian Prantl's avatar
      cleanup testcase some more · a8aa97d3
      Adrian Prantl authored
      rdar://problem/13056109
      
      llvm-svn: 180619
      a8aa97d3
    • Adrian Prantl's avatar
      d00333a4
    • Quentin Colombet's avatar
      ARM: Fix encoding of hint instruction for Thumb. · a83d5e9f
      Quentin Colombet authored
      "hint" space for Thumb actually overlaps the encoding space of the CPS
      instruction. In actuality, hints can be defined as CPS instructions where imod
      and M bits are all nil.
      
      Handle decoding of permitted nop-compatible hints (i.e. nop, yield, wfi, wfe,
      sev) in DecodeT2CPSInstruction.
      
      This commit adds a proper diagnostic message for Imm0_4 and updates all tests.
      
      Patch by Mihail Popa <Mihail.Popa@arm.com>.
      
      llvm-svn: 180617
      a83d5e9f
    • Rafael Espindola's avatar
      Add missing ':'. · 37212578
      Rafael Espindola authored
      llvm-svn: 180616
      37212578
    • Adrian Prantl's avatar
      Bugfix for the debug intrinsic handling in InstCombiner: · 29b9de7b
      Adrian Prantl authored
      Since we can't guarantee that the original dbg.declare instrinsic
      is removed by LowerDbgDeclare(), we need to make sure that we are
      not inserting the same dbg.value intrinsic over and over.
      This removes tons of redundant DIEs when compiling optimized code.
      
      rdar://problem/13056109
      
      llvm-svn: 180615
      29b9de7b
    • Ulrich Weigand's avatar
      · 136ac22e
      Ulrich Weigand authored
      PowerPC: Use RegisterOperand instead of RegisterClass operands
      
      In the default PowerPC assembler syntax, registers are specified simply
      by number, so they cannot be distinguished from immediate values (without
      looking at the opcode).  This means that the default operand matching logic
      for the asm parser does not work, and we need to specify custom matchers.
      Since those can only be specified with RegisterOperand classes and not
      directly on the RegisterClass, all instructions patterns used by the asm
      parser need to use a RegisterOperand (instead of a RegisterClass) for
      all their register operands.
      
      This patch adds one RegisterOperand for each RegisterClass, using the
      same name as the class, just in lower case, and updates all instruction
      patterns to use RegisterOperand instead of RegisterClass operands.
      
      llvm-svn: 180611
      136ac22e
    • Silviu Baranga's avatar
      Re-write the address propagation code for pre-indexed loads/stores to take... · af7e8c36
      Silviu Baranga authored
      Re-write the address propagation code for pre-indexed loads/stores to take into account some previously misssed cases (PRE_DEC addressing mode, the offset and base address are swapped, etc). This should fix PR15581.
      
      llvm-svn: 180609
      af7e8c36
    • Ulrich Weigand's avatar
      · 551b085d
      Ulrich Weigand authored
      PowerPC: Fix encoding of vsubcuw and vsum4sbs instructions
      
      When testing the asm parser, I noticed wrong encodings for the
      above instructions (wrong sub-opcodes).
      
      Tests will be added together with the asm parser.
      
      llvm-svn: 180608
      551b085d
    • Ulrich Weigand's avatar
      · 48b949b6
      Ulrich Weigand authored
      PowerPC: Fix encoding of stfsu and stfdu instructions
      
      When testing the asm parser, I noticed wrong encodings for the
      above instructions (wrong sub-opcodes).  Note that apparently
      the compiler currently never generates pre-inc instructions
      for floating point types for some reason ...
      
      Tests will be added together with the asm parser.
      
      llvm-svn: 180607
      48b949b6
    • Ulrich Weigand's avatar
      · fa451ba1
      Ulrich Weigand authored
      PowerPC: Fix encoding of rldimi and rldcl instructions
      
      When testing the asm parser, I noticed wrong encodings for the
      above instructions (wrong operand name in rldimi, wrong form
      and sub-opcode for rldcl).
      
      Tests will be added together with the asm parser.
      
      llvm-svn: 180606
      fa451ba1
    • Ulrich Weigand's avatar
      · 72a7dc0d
      Ulrich Weigand authored
      PowerPC: Support PC-relative fixup_ppc_brcond14.
      
      When testing the asm parser, I ran into an error when using a conditional
      branch to an external symbol (this doesn't occur in compiler-generated
      code) due to missing support in PPCELFObjectWriter::getRelocTypeInner.
      
      llvm-svn: 180605
      72a7dc0d
    • Benjamin Kramer's avatar
      ARM/NEON: Pattern match vector integer abs to vabs. · ae81474a
      Benjamin Kramer authored
      llvm-svn: 180604
      ae81474a
    • Benjamin Kramer's avatar
    • Benjamin Kramer's avatar
      DAGCombiner: Canonicalize vector integer abs in the same way we do it for scalars. · d56ffc70
      Benjamin Kramer authored
      This already helps SSE2 x86 a lot because it lacks an efficient way to
      represent a vector select. The long term goal is to enable the backend to match
      a canonicalized pattern into a single instruction (e.g. vabs or pabs).
      
      llvm-svn: 180597
      d56ffc70
    • Nadav Rotem's avatar
      LoopVectorizer: Calculate the number of pointers to disambiguate at runtime... · 13306816
      Nadav Rotem authored
      LoopVectorizer:  Calculate the number of pointers to disambiguate at runtime based on the numbers of reads and writes.
      
      llvm-svn: 180593
      13306816
    • Michael Gottesman's avatar
      Use 'git svn find-rev' in git-svnrevert instead of shell script fu. · 68be5200
      Michael Gottesman authored
      Thanks Chandler!
      
      llvm-svn: 180592
      68be5200
    • Michael Gottesman's avatar
      Revert "[objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls... · 47cf8a4c
      Michael Gottesman authored
      Revert "[objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls that were once autoreleaseRV instructions."
      
      This reverts commit r180222.
      
      I think this might tie in with a different problem which will require a
      different approach potentially. I am reverting this in the case I need to go
      down that second path.
      
      My apologies for the noise. = /.
      
      llvm-svn: 180590
      47cf8a4c
    • Michael Gottesman's avatar
      Updated GettingStarted.rst so that it references utils/git-svn for git-svnup... · a0509add
      Michael Gottesman authored
      Updated GettingStarted.rst so that it references utils/git-svn for git-svnup instead of catting it into the documentation itself.
      
      llvm-svn: 180589
      a0509add
    • Michael Gottesman's avatar
      Added the scripts git-svnup/git-svnrevert to utils/git-svn. · d8134208
      Michael Gottesman authored
      It makes more sense to have git-svnup here than catting said file in the
      documentation (where we should rather point users to this directory).
      I included git-svnrevert as an additional gift to the community. I will update
      the documentation in a second commit later today.
      
      git-svnrevert takes in a git hash for a commit, looks up the svn revision for
      said commit and then creates the normal git revert commit message with the one
      liner message, except instead of saying
      
        Revert "<<<INSERT ONELINER HERE>>>"
      
        This reverts commit <<<INSERT GITHASH HERE>>>
      
      It says:
      
        Revert "<<<INSERT ONELINER HERE>>>"
      
        This reverts commit r<<<INSERT SVN REVISION HERE>>>
      
      so git hashes will not escape into our svn logs (which just look unseemly).
      
      llvm-svn: 180587
      d8134208
Loading