Peng Cheng [Wed, 1 May 2013 14:07:02 +0000 (14:07 +0000)]
use static_cast to get rid of windows warning.
warning C4244: 'argument' : conversion from 'uint64_t' to 'const unsigned int', possible loss of data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180846
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 1 May 2013 13:07:03 +0000 (13:07 +0000)]
Now that the underlying issue is fixed, revert r180750 and r180722.
The cause of the windows failures was fixed by r180791. Revert to the state
after Sabre's original revert.
Original message:
revert r179735, it has no testcases, and doesn't really make sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180844
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikola Smiljanic [Wed, 1 May 2013 13:05:43 +0000 (13:05 +0000)]
Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180843
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 1 May 2013 13:00:16 +0000 (13:00 +0000)]
Put VMOVPQIto64rr in the VRPDI class.
Patch by Joshua Magee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180842
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 1 May 2013 07:54:55 +0000 (07:54 +0000)]
Correct comment: there is no numTys parameter any more now that this is using
ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180840
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 1 May 2013 06:46:59 +0000 (06:46 +0000)]
Wrap some lines to bring MCJITCAPITest into conformance with the 80 column limit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180839
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 1 May 2013 05:45:57 +0000 (05:45 +0000)]
Forget remove the tempfile argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180838
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 1 May 2013 05:34:30 +0000 (05:34 +0000)]
More rewrites of x86 codegen regression tests with FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180837
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 1 May 2013 02:53:14 +0000 (02:53 +0000)]
Fixes a buffer overrun where the allocated buffer wasn't large enough to accommodate the closing quote escape rules in some instances.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180836
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 1 May 2013 00:25:27 +0000 (00:25 +0000)]
Revert "InstCombine: Fold more shuffles of shuffles."
This reverts commit r180802
There's ongoing discussion about whether this is the right place to make
this transformation. Reverting for now while we figure it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180834
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Apr 2013 23:22:09 +0000 (23:22 +0000)]
[mips] Fix handling of instructions which copy to/from accumulator registers.
Expand copy instructions between two accumulator registers before callee-saved
scan is done. Handle copies between integer GPR and hi/lo registers in
MipsSEInstrInfo::copyPhysReg. Delete pseudo-copy instructions that are not
needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180827
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Tue, 30 Apr 2013 22:49:28 +0000 (22:49 +0000)]
Only pass 'returned' to target-specific lowering code when the value of entire register is guaranteed to be preserved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180825
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 30 Apr 2013 22:45:10 +0000 (22:45 +0000)]
Fix a use after free. RI is freed before the call to getDebugLoc(). To
prevent this, capture the location before RI is freed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180824
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Apr 2013 22:37:26 +0000 (22:37 +0000)]
[mips] Instruction selection patterns for DSP-ASE vector select and compare
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180820
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Apr 2013 22:35:14 +0000 (22:35 +0000)]
Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots.
This reverts commit 180816.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180819
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Apr 2013 22:16:46 +0000 (22:16 +0000)]
Change the informal convention of DBG_VALUE so that we can express a
register-indirect address with an offset of 0.
It used to be that a DBG_VALUE is a register-indirect value if the offset
(operand 1) is nonzero. The new convention is that a DBG_VALUE is
register-indirect if the first operand is a register and the second
operand is an immediate. For plain registers use the combination reg, reg.
rdar://problem/
13658587
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180816
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 30 Apr 2013 22:10:59 +0000 (22:10 +0000)]
MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.
I'll fix the heuristic in a general way in a follow-up commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180815
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Apr 2013 21:17:07 +0000 (21:17 +0000)]
[mips] Simplify code.
No intended functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180807
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Apr 2013 21:04:51 +0000 (21:04 +0000)]
Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180806
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Apr 2013 21:04:04 +0000 (21:04 +0000)]
Update the release notes about the min/max reductions that Arnold added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180805
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Apr 2013 20:48:49 +0000 (20:48 +0000)]
[mips] Test for r179873.
Patch by Zoran Jovanovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180804
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Apr 2013 20:43:52 +0000 (20:43 +0000)]
InstCombine: Fold more shuffles of shuffles.
Always fold a shuffle-of-shuffle into a single shuffle when there's only one
input vector in the first place. Continue to be more conservative when there's
multiple inputs.
rdar://
13402653
PR15866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180802
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Apr 2013 20:40:39 +0000 (20:40 +0000)]
[mips] Clear isCommutable bit of instructions which are not commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180801
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Apr 2013 20:04:37 +0000 (20:04 +0000)]
LocalStackSlotAllocation improvements
First, taking advantage of the fact that the virtual base registers are allocated in order of the local frame offsets, remove the quadratic register-searching behavior. Because of the ordering, we only need to check the last virtual base register created.
Second, store the frame index in the FrameRef structure, and get the frame index and the local offset from this structure at the top of the loop iteration. This allows us to de-nest the loops in insertFrameReferenceRegisters (and I think makes the code cleaner). I also moved the needsFrameBaseReg check into the first loop over instructions so that we don't bother pushing FrameRefs for instructions that don't want a virtual base register anyway.
Lastly, and this is the only functionality change, avoid the creation of single-use virtual base registers. These are currently not useful because, in general, they end up replacing what would be one r+r instruction with an add and a r+i instruction. Committing this removes the XFAIL in CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll
Jim has okayed this off-list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180799
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Apr 2013 19:06:15 +0000 (19:06 +0000)]
Text files should not be marked executable.
Patch by Oliver Pinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180797
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 30 Apr 2013 17:52:57 +0000 (17:52 +0000)]
TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180796
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Apr 2013 17:33:32 +0000 (17:33 +0000)]
Spelling. Thanks, Eric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180794
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Apr 2013 17:08:16 +0000 (17:08 +0000)]
Set debug locations for branch instructions created during inlining, even
the inlined function has multiple returns.
rdar://problem/
12415623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180793
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Apr 2013 16:53:38 +0000 (16:53 +0000)]
Change getSlotIndex to return unsigned.
The actual storage was already using unsigned, but the interface was using
uint64_t. This is wasteful on 32 bits and looks to be the root causes of
a miscompilation on Windows where a value was being sign extended to 64bits
to compare with the result of getSlotIndex.
Patch by Pasi Parviainen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180791
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Apr 2013 15:40:54 +0000 (15:40 +0000)]
Fix Addend computation for non external relocations on Macho.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180790
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 12:47:56 +0000 (12:47 +0000)]
R600: fix loop-address.ll test
Texture cache is now used when shader type is not specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180785
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 30 Apr 2013 10:36:33 +0000 (10:36 +0000)]
Fix a bug in foldSelectICmpAndOr.
Differences in bitwidth between X and Y could exist even if C1 and C2 have
the same Log2 representation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180779
91177308-0d34-0410-b5e6-
96231b3b80d8
Mihai Popa [Tue, 30 Apr 2013 09:00:12 +0000 (09:00 +0000)]
s tightens up the encoding description for ARM post-indexed ldr instructions. All instructions in this class have bit 4 cleared. It turns out that there is a test case for this, but it was marked XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180778
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 30 Apr 2013 08:57:58 +0000 (08:57 +0000)]
Fix "Combine bit test + conditional or into simple math"
This fixes the optimization introduced in r179748 and reverted in r179750.
While the optimization was sound, it did not properly respect differences in
bit-width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180777
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 30 Apr 2013 07:51:08 +0000 (07:51 +0000)]
Rewrite X86 codegen regression test with FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180776
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 30 Apr 2013 07:19:58 +0000 (07:19 +0000)]
Refactoring patch.
1. VarArgStyleRegisters: functionality that emits "store" instructions for byval regs moved out into separated method "StoreByValRegs". Before this patch VarArgStyleRegisters had confused use-cases. It was used for both variadic functions and for regular functions with byval parameters. In last case it created new stack-frame and registered it as VarArg frame, that is wrong.
This patch replaces VarArgsStyleRegisters usage for byval parameters with StoreByValRegs method.
2. In ARMMachineFunctionInfo, "get/setVarArgsRegSaveSize" was renamed to "get/setArgRegsSaveSize". By the same reason. Sometimes it was used for variadic functions, and sometimes for byval parameters in regular functions. Actually, this property means the size of registers, that keeps arguments, and thats why it was renamed.
3. In ARMISelLowering.cpp, ARMTargetLowering class, in methods computeRegArea and StoreByValRegs, VARegXXXXXX was renamed to ArgRegsXXXXXX still by the same reasons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180774
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 30 Apr 2013 04:30:41 +0000 (04:30 +0000)]
Try to fix ProgramTest on FreeBSD
This seemed like the cleanest way to find the test executable. Also fix
the file mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180770
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Apr 2013 01:29:57 +0000 (01:29 +0000)]
Collect the Addend for external relocs.
This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external
relocs with an Addend. I will try to write one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180767
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:14:44 +0000 (00:14 +0000)]
R600: Always use texture cache for compute shaders
This will improve the performance of memory reads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180762
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:14:38 +0000 (00:14 +0000)]
R600: use native for alu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180761
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:14:27 +0000 (00:14 +0000)]
R600: Packetize instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180760
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:14:17 +0000 (00:14 +0000)]
R600: Rework Scheduling to handle difference between VLIW4 and VLIW5 chips
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180759
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:14:08 +0000 (00:14 +0000)]
R600: Add a Bank Swizzle operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180758
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:14:00 +0000 (00:14 +0000)]
R600: Take inner dependency into tex/vtx clauses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180757
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:13:53 +0000 (00:13 +0000)]
R600: Turn TEX/VTX into native instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180756
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:13:39 +0000 (00:13 +0000)]
R600: Add FetchInst bit to instruction defs to denote vertex/tex instructions
v2[Vincent Lejeune]: Split FetchInst into usesTextureCache/usesVertexCache
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180755
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 30 Apr 2013 00:13:38 +0000 (00:13 +0000)]
Rewrite test in FileCheck instead of grep in X86 codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180754
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:13:27 +0000 (00:13 +0000)]
R600: Add some new processor variants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180753
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:13:20 +0000 (00:13 +0000)]
R600: Clean up instruction class definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180752
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 30 Apr 2013 00:13:13 +0000 (00:13 +0000)]
R600: config section now reports use of killgt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180751
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 29 Apr 2013 23:48:06 +0000 (23:48 +0000)]
Revert the command line option patch. However, keep the part that makes this pass on Windows. I.e., we don't emit the target dependent attributes in a comment before the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180750
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 29 Apr 2013 22:58:55 +0000 (22:58 +0000)]
TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180745
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 29 Apr 2013 22:42:47 +0000 (22:42 +0000)]
Duplicate a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180744
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 29 Apr 2013 22:42:01 +0000 (22:42 +0000)]
TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180743
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 29 Apr 2013 22:41:29 +0000 (22:41 +0000)]
Rewrite some tests with FileCHeck in X86 codegen
- Revise previous patches of the same purpose by fixing
*) grep <PA> | not grep <PB> semantically is not the same as
CHECK: <PA>{{^<PB>.*$}} as the former will check all occurrences of <PA>
while the later only check the first match. As the result, CHECK needs
putting in all place where <PA> occurs.
*) grep <PA> | count <N> needs a final CHECK-NOT of the same pattern.
(As 'CHECK-<N>' is proposed for discussion, converting 'grep | count <N>'
where N > 1 is postponed.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180742
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 29 Apr 2013 22:25:52 +0000 (22:25 +0000)]
Improve documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180738
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 29 Apr 2013 22:25:40 +0000 (22:25 +0000)]
Emit the TLS initialization function pointers into the correct section.
The `llvm.tls_init_funcs' (created by the front-end) holds pointers to the TLS
initialization functions. These need to be placed into the correct section so
that they are run before `main()'.
<rdar://problem/
13733006>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180737
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 22:24:22 +0000 (22:24 +0000)]
Add getSymbolAlignment to the ObjectFile interface.
For regular object files this is only meaningful for common symbols. An object
file format with direct support for atoms should be able to provide alignment
information for all symbols.
This replaces getCommonSymbolAlignment and fixes
test-common-symbols-alignment.ll on darwin. This also includes a fix to
MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common
(already tested by existing mcjit tests now that it is used).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180736
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 29 Apr 2013 22:23:58 +0000 (22:23 +0000)]
R600: Use correct CF_END instruction on Northern Island GPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180735
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 29 Apr 2013 22:23:54 +0000 (22:23 +0000)]
R600: Fix encoding of CF_END_{EG, R600} instructions
The EOP bit was not being encoded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180734
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 22:06:33 +0000 (22:06 +0000)]
Rationalize what is public in RuntimeDyldMachO and RuntimeDyldELF.
The implemented RuntimeDyldImpl interface is public. Everything else is private.
Since these classes are not inherited from (yet), there is no need to have
protected members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180733
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 29 Apr 2013 21:28:24 +0000 (21:28 +0000)]
SimplifyCFG: If convert single conditional stores
This resurrects r179957, but adds code that makes sure we don't touch
atomic/volatile stores:
This transformation will transform a conditional store with a preceeding
uncondtional store to the same location:
a[i] =
may-alias with a[i] load
if (cond)
a[i] = Y
into an unconditional store.
a[i] = X
may-alias with a[i] load
tmp = cond ? Y : X;
a[i] = tmp
We assume that on average the cost of a mispredicted branch is going to be
higher than the cost of a second store to the same location, and that the
secondary benefits of creating a bigger basic block for other optimizations to
work on outway the potential case where the branch would be correctly predicted
and the cost of the executing the second store would be noticably reflected in
performance.
hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With
this change we are on par with gcc's performance (gcc also performs this
transformation). There was a 1.2 % performance improvement on a ARM swift chip.
Other tests in the test-suite+external seem to be mostly uninfluenced in my
experiments:
This optimization was triggered on 41 tests such that the executable was
different before/after the patch. Only 1 out of the 40 tests (dealII) was
reproducable below 100% (by about .4%). Given that hmmer benefits so much I
believe this to be a fair trade off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180731
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 21:09:32 +0000 (21:09 +0000)]
Disable the MCJIT tests on 32 bit darwin.
I recently enabled them on 32 and 64 bit darwin, but it looks like 32 bit is
still fairly broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180730
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 20:00:27 +0000 (20:00 +0000)]
Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180729
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 19:33:51 +0000 (19:33 +0000)]
Update the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180725
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 19:03:21 +0000 (19:03 +0000)]
Use a RelocationRef instead of a relocation_iterator.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180723
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 29 Apr 2013 18:23:53 +0000 (18:23 +0000)]
Revert "revert r179735, it has no testcases, and doesn't really make sense."
This un-reverts r179735 and reverts commit r180574.
This fixes assertion failures for me locally and should fix the failures
on Windows reported widely on llvm-dev. We should check if the bots
caught this and if so why not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180722
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 29 Apr 2013 17:49:40 +0000 (17:49 +0000)]
Exposing MCJIT through C API
Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used).
Patch by Fili Pizlo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180720
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 17:24:34 +0000 (17:24 +0000)]
Propagate relocation info to resolveRelocation.
This gets most of the MCJITs tests passing with MachO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180716
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Apr 2013 14:44:23 +0000 (14:44 +0000)]
Replace ObjRelocationInfo with relocation_iterator.
For MachO we need information that is not represented in ObjRelocationInfo.
Instead of copying the bits we think are needed from a relocation_iterator,
just pass the relocation_iterator down to the format specific functions.
No functionality change yet as we still drop the information once
processRelocationRef returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180711
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 29 Apr 2013 07:29:08 +0000 (07:29 +0000)]
Add in some conditional compilation in order to silence an unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180700
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 29 Apr 2013 06:53:53 +0000 (06:53 +0000)]
[objc-arc] Apply the RV optimization to retains next to calls in ObjCARCContract instead of ObjCARCOpts.
Turning retains into retainRV calls disrupts the data flow analysis in
ObjCARCOpts. Thus we move it as late as we can by moving it into
ObjCARCContract.
We leave in the conversion from retainRV -> retain in ObjCARCOpt since
it enables the dataflow analysis.
rdar://
10813093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180698
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 29 Apr 2013 06:16:57 +0000 (06:16 +0000)]
Added statistics to count the number of retains/releases before/after optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180697
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 29 Apr 2013 06:16:55 +0000 (06:16 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180696
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 29 Apr 2013 05:25:39 +0000 (05:25 +0000)]
Fix for r180693. = /.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180694
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 29 Apr 2013 05:13:13 +0000 (05:13 +0000)]
[objc-arc-annotations] Moved the disabling of call movement to ConnectTDBUTraversals so that I can prevent Changed = true from being set. This prevents an infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180693
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 28 Apr 2013 07:47:04 +0000 (07:47 +0000)]
Inline variable into the #ifdef block where it's used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180688
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Sun, 28 Apr 2013 01:45:11 +0000 (01:45 +0000)]
AArch64 InstrFormats:
delete blank.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180687
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 27 Apr 2013 22:32:54 +0000 (22:32 +0000)]
Fix typo. Stupid me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180686
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 27 Apr 2013 22:23:16 +0000 (22:23 +0000)]
Regen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180685
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 27 Apr 2013 22:12:32 +0000 (22:12 +0000)]
Only use cxxabi.h's demangler, if it is actually available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180684
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Sat, 27 Apr 2013 18:48:23 +0000 (18:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180677
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Sat, 27 Apr 2013 18:02:12 +0000 (18:02 +0000)]
Fix a XOR reassociation bug.
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180676
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 27 Apr 2013 16:34:24 +0000 (16:34 +0000)]
Documentation: end option description with a period
Patch by Dimitry Andric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180675
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 27 Apr 2013 11:56:14 +0000 (11:56 +0000)]
AArch64: convert MC-layer test to .s file
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180671
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 27 Apr 2013 05:25:54 +0000 (05:25 +0000)]
[objc-arc] Test cleanups.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180668
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 27 Apr 2013 03:54:20 +0000 (03:54 +0000)]
Generalize the MachineTraceMetrics public API.
Naturally, we should be able to pass in extra instructions, not just
extra blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180667
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 27 Apr 2013 03:54:17 +0000 (03:54 +0000)]
Add target flags to MachineMemOperands.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180666
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 27 Apr 2013 03:54:14 +0000 (03:54 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180665
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 27 Apr 2013 01:07:52 +0000 (01:07 +0000)]
Use the target triple from the target machine rather than the module
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180660
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 27 Apr 2013 01:07:22 +0000 (01:07 +0000)]
Move the XFAIL out of the middle of a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180659
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Apr 2013 00:43:16 +0000 (00:43 +0000)]
Make all darwin ppc stubs local.
This fixes pr15763.
Patch by David Fang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180657
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 27 Apr 2013 00:26:11 +0000 (00:26 +0000)]
Struct-path aware TBAA: change the format of TBAAStructType node.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180654
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 26 Apr 2013 21:57:17 +0000 (21:57 +0000)]
Cleanup and document MachineLocation.
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180641
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 26 Apr 2013 21:15:08 +0000 (21:15 +0000)]
Micro-optimization
TLVs probably won't be as common as the other types of variables. Check for them
last before defaulting to "DATA".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180631
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 26 Apr 2013 21:04:21 +0000 (21:04 +0000)]
Make CHECK lines a bit less strict so they also match code generated for win64.
Hopefully brings the windows buildbots back to life.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180630
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 26 Apr 2013 20:19:41 +0000 (20:19 +0000)]
Teach the interpreter to handle vector compares and additional vector arithmetic operations.
Patch by Yuri Veselov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180626
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Apr 2013 20:07:33 +0000 (20:07 +0000)]
Use llvm/Object/MachO.h in macho-dumper. Drop the old macho parser.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180624
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Apr 2013 19:07:40 +0000 (19:07 +0000)]
The exception demo needs its symbols exported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180622
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 26 Apr 2013 18:32:24 +0000 (18:32 +0000)]
R600: Initialize AMDGPUMachineFunction::ShaderType to ShaderType::COMPUTE
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: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180620
91177308-0d34-0410-b5e6-
96231b3b80d8