Venkatraman Govindaraju
3c6418f9fc
Multiple SPARC backend fixes: added Y register; updated select_cc, subx, subxcc defs/uses;
...
and fixed CustomInserter.
llvm-svn: 122607
2010-12-28 20:39:17 +00:00
Tobias Grosser
4f458bffaa
Integers are primitive types. Update the documentation to state this
...
This was done for label, void, floating point, x86mmx, metadata,
just not integer.
llvm-svn: 122606
2010-12-28 20:29:31 +00:00
Chris Lattner
51a906ce92
simplify this, isBytewiseValue handles the extra check. We still
...
check for "multiple of a byte" in size to make it clear that the
>> 3 below is safe.
llvm-svn: 122604
2010-12-28 18:53:48 +00:00
Chris Lattner
8e3ff12790
add a note from llvmdev
...
llvm-svn: 122603
2010-12-28 18:45:02 +00:00
Rafael Espindola
3fdd045643
Implement .cfi_remember_state and .cfi_restore_state.
...
llvm-svn: 122602
2010-12-28 18:36:23 +00:00
Duncan Sands
87515f1e57
Clarify that InstructionSimplify only returns values that dominate the
...
original instruction.
llvm-svn: 122601
2010-12-28 18:01:19 +00:00
Duncan Sands
707bdbd129
Small optimization to speed up replacementPreservesLCSSAForm.
...
llvm-svn: 122600
2010-12-28 18:00:24 +00:00
Benjamin Kramer
5acd47c674
Cast away "comparison between signed and unsigned integer" warnings.
...
llvm-svn: 122598
2010-12-28 13:52:52 +00:00
Benjamin Kramer
133004a64d
Fix a signed/unsigned comparison warning.
...
llvm-svn: 122597
2010-12-28 13:05:13 +00:00
Cameron Zwarich
c9c7488542
Avoid iterating every operand of an instruction in StrongPHIElimination, since
...
we are only interested in the defs when discovering interferences.
This is a 28% speedup running StrongPHIElimination on 403.gcc.
llvm-svn: 122596
2010-12-28 10:49:33 +00:00
Duncan Sands
cc5a4497fd
Pacify the compiler. BestWeight cannot in fact be used uninitialized
...
in this function, but the compiler was warning that it might be when
doing a release build.
llvm-svn: 122595
2010-12-28 10:07:15 +00:00
Duncan Sands
4799c69192
Fix warning about size potentially being used uninitialized
...
when doing a release build.
llvm-svn: 122594
2010-12-28 10:02:42 +00:00
Duncan Sands
1395f115d8
Silence gcc warning about an unused variable when doing a release build.
...
llvm-svn: 122593
2010-12-28 09:41:15 +00:00
Rafael Espindola
c97d642bf7
Relax address updates in the eh_frame section.
...
llvm-svn: 122591
2010-12-28 05:39:27 +00:00
Rafael Espindola
0552cb0638
Start adding basic support for emitting the call frame instructions.
...
llvm-svn: 122590
2010-12-28 04:15:37 +00:00
Michael J. Spencer
b604751adb
Support/Path: Deprecate Path::hasMagicNumber and replace all uses with fs::has_magic.
...
llvm-svn: 122589
2010-12-28 01:49:21 +00:00
Michael J. Spencer
6d174b7e25
Fix typo.
...
llvm-svn: 122588
2010-12-28 01:49:10 +00:00
Michael J. Spencer
018595cf3a
Support/PathV2: Implement has_magic.
...
llvm-svn: 122587
2010-12-28 01:49:01 +00:00
Cameron Zwarich
30f2239301
Change an assertion to assert what the code actually relies upon.
...
llvm-svn: 122586
2010-12-27 22:08:42 +00:00
Chris Lattner
2658d522b1
fix some issues Frits noticed, add AliasAnalysis as a dependency
...
llvm-svn: 122585
2010-12-27 18:39:08 +00:00
Rafael Espindola
12c30aed07
Add support for .cfi_lsda.
...
llvm-svn: 122584
2010-12-27 15:56:22 +00:00
Daniel Dunbar
2d0cf8e149
MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.
...
llvm-svn: 122583
2010-12-27 14:49:49 +00:00
Cameron Zwarich
cfdb10a1bb
Land a first cut at StrongPHIElimination. There are only 5 new test failures
...
when running without the verifier, and I have not yet checked them to see if
the new results are still correct. There are more verifier failures, but they
all seem to be additional occurrences of verifier failures that occur with the
existing PHIElimination pass. There are a few obvious issues with the code:
1) It doesn't properly update the register equivalence classes during copy
insertion, and instead recomputes them before merging live intervals and
renaming registers. I wanted to keep this first patch simple for debugging
purposes, but it shouldn't be very hard to do this.
2) It doesn't mix the renaming and live interval merging with the copy insertion
process, which leads to a lot of virtual register churn. Virtual registers and
live intervals are created, only to later be merged into others. The code should
be smarter and only create a new virtual register if there is no existing
register in the same congruence class.
3) In one place the code uses a DenseMap per basic block, which is unnecessary
heap allocation. There should be an inline storage version of DenseMap.
I did a quick compile-time test of running llc on 403.gcc with and without
StrongPHIElimination. It is slightly slower with StrongPHIElimination, because
the small decrease in the coalescer runtime can't beat the increase in phi
elimination runtime. Perhaps fixing the above performance issues will narrow
the gap.
I also haven't yet run any tests of the quality of the generated code.
llvm-svn: 122582
2010-12-27 10:08:19 +00:00
Cameron Zwarich
66289e34e1
Add knowledge of phi-def and phi-kill valnos to MachineVerifier's predecessor
...
valno verification. The "Different value live out of predecessor" check is
incorrect in the case of phi-def valnos, so just skip that check for phi-def
valnos and instead check that all of the valnos for predecessors have phi-kill.
Fixes PR8863.
llvm-svn: 122581
2010-12-27 05:17:23 +00:00
Michael J. Spencer
26654048d7
Support/PathV1: Deprecate GetRootDirectory.
...
llvm-svn: 122580
2010-12-27 03:21:41 +00:00
Rafael Espindola
7f947794d7
Handle reloc_riprel_4byte_movq_load. Should make the bots happy.
...
llvm-svn: 122579
2010-12-27 02:03:24 +00:00
Rafael Espindola
e7e67fce10
Add support for the same encodings of the personality function that gnu as
...
supports.
llvm-svn: 122577
2010-12-27 00:36:05 +00:00
Benjamin Kramer
30e1ba0fcc
BuildLibCalls: Nuke EmitMemCpy, EmitMemMove and EmitMemSet. They are dead and superseded by IRBuilder.
...
llvm-svn: 122576
2010-12-27 00:25:32 +00:00
Benjamin Kramer
c66455a774
SimplifyLibCalls: Use IRBuilder to simplify code.
...
llvm-svn: 122575
2010-12-27 00:16:46 +00:00
Chris Lattner
a4249272b5
have loop-idiom nuke instructions that feed stores that get removed.
...
llvm-svn: 122574
2010-12-27 00:03:23 +00:00
Chris Lattner
d4daf9f002
implement enough of the memset inference algorithm to recognize and insert
...
memsets. This is still missing one important validity check, but this is enough
to compile stuff like this:
void test0(std::vector<char> &X) {
for (std::vector<char>::iterator I = X.begin(), E = X.end(); I != E; ++I)
*I = 0;
}
void test1(std::vector<int> &X) {
for (long i = 0, e = X.size(); i != e; ++i)
X[i] = 0x01010101;
}
With:
$ clang t.cpp -S -o - -O2 -emit-llvm | opt -loop-idiom | opt -O3 | llc
to:
__Z5test0RSt6vectorIcSaIcEE: ## @_Z5test0RSt6vectorIcSaIcEE
## BB#0: ## %entry
subq $8, %rsp
movq (%rdi), %rax
movq 8(%rdi), %rsi
cmpq %rsi, %rax
je LBB0_2
## BB#1: ## %bb.nph
subq %rax, %rsi
movq %rax, %rdi
callq ___bzero
LBB0_2: ## %for.end
addq $8, %rsp
ret
...
__Z5test1RSt6vectorIiSaIiEE: ## @_Z5test1RSt6vectorIiSaIiEE
## BB#0: ## %entry
subq $8, %rsp
movq (%rdi), %rax
movq 8(%rdi), %rdx
subq %rax, %rdx
cmpq $4, %rdx
jb LBB1_2
## BB#1: ## %for.body.preheader
andq $-4, %rdx
movl $1, %esi
movq %rax, %rdi
callq _memset
LBB1_2: ## %for.end
addq $8, %rsp
ret
llvm-svn: 122573
2010-12-26 23:42:51 +00:00
Chris Lattner
9007b56712
start using irbuilder to make mem intrinsics in a few passes.
...
llvm-svn: 122572
2010-12-26 22:57:41 +00:00
Chris Lattner
a46fd80777
add methods to IRBuilder to create memcpy/memset/memmove.
...
llvm-svn: 122571
2010-12-26 22:49:25 +00:00
Rafael Espindola
e9e6794917
Fix .cfi_personality on 32 bit systems.
...
llvm-svn: 122570
2010-12-26 22:47:37 +00:00
Rafael Espindola
2ebe553431
Add support for @note. Patch by Jörg Sonnenberger.
...
llvm-svn: 122568
2010-12-26 21:30:59 +00:00
Chris Lattner
27961b5180
sketch more of this out.
...
llvm-svn: 122567
2010-12-26 20:45:45 +00:00
Rafael Espindola
99f1527316
Add basic support for .cfi_personality.
...
llvm-svn: 122566
2010-12-26 20:20:31 +00:00
Chris Lattner
c56d20aa48
move isBytewiseValue out to ValueTracking.h/cpp
...
llvm-svn: 122565
2010-12-26 20:15:01 +00:00
Chris Lattner
73f562af94
actually add the file...
...
llvm-svn: 122563
2010-12-26 19:39:38 +00:00
Chris Lattner
e210c31646
Start of a pass for recognizing memset and memcpy idioms.
...
No functionality yet.
llvm-svn: 122562
2010-12-26 19:32:44 +00:00
Benjamin Kramer
626fccab8b
Simplify code.
...
llvm-svn: 122561
2010-12-26 15:23:45 +00:00
Chris Lattner
a6f2b8316f
fix some sort of weird pasto
...
llvm-svn: 122560
2010-12-26 12:05:11 +00:00
Chris Lattner
eec079a470
add a note
...
llvm-svn: 122559
2010-12-26 03:53:31 +00:00
Chris Lattner
2129ce0891
Generalize a previous change, fixing PR8855 - an valid large immediate
...
rejected by the mc assembler.
llvm-svn: 122557
2010-12-25 21:36:35 +00:00
Chris Lattner
a73a53e67f
don't lose TD info
...
llvm-svn: 122556
2010-12-25 20:52:04 +00:00
Chris Lattner
38d6d6d367
switch the inliner alignment enforcement stuff to use the
...
getOrEnforceKnownAlignment function, which simplifies the code
and makes it stronger.
llvm-svn: 122555
2010-12-25 20:42:38 +00:00
Chris Lattner
c4cb20b9bf
Move getOrEnforceKnownAlignment out of instcombine into Transforms/Utils.
...
llvm-svn: 122554
2010-12-25 20:37:57 +00:00
Michael J. Spencer
b3e50a570f
Support/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people.
...
llvm-svn: 122553
2010-12-25 20:10:11 +00:00
Eric Christopher
61974eb1f8
Header warning patrol.
...
llvm-svn: 122551
2010-12-25 02:38:01 +00:00
Benjamin Kramer
720b32b319
Fix a thinko pointed out by Frits van Bommel: looking through global variables in isBytewiseValue is not safe.
...
llvm-svn: 122550
2010-12-24 22:23:59 +00:00