Reid Spencer
d9f7298477
For PR1151:
...
Make llvm-upgrade valgrind clean. Deleting type instances is a really
nasty thing to do to LLVM. This was a hold-over from the re-write.
This fixes test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll and
potentially many other bugs.
llvm-svn: 33858
2007-02-04 01:05:23 +00:00
Chris Lattner
ed39c86176
switch LegalizedNodes from std::map to a DenseMap. This speeds up isel
...
time as a whole on kc++ by 11%.
llvm-svn: 33857
2007-02-04 00:50:02 +00:00
Chris Lattner
692457f107
add a version of insert that takes the key and value.
...
llvm-svn: 33856
2007-02-04 00:42:41 +00:00
Reid Spencer
3f4e6e84dc
For PR1163:
...
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Chris Lattner
09ec2c842a
Make SmallSetVector useful
...
llvm-svn: 33854
2007-02-04 00:30:40 +00:00
Chris Lattner
ebeb48d4bc
Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding
...
up isel on kimwitu by 0.7%.
llvm-svn: 33853
2007-02-04 00:27:56 +00:00
Chris Lattner
cba058ce51
Eliminate some std::sets. This speeds up isel of kimwitu by about 0.9%
...
llvm-svn: 33852
2007-02-04 00:24:41 +00:00
Reid Spencer
d751385a7a
Make sure the gccas script is executable.
...
llvm-svn: 33851
2007-02-04 00:23:51 +00:00
Reid Spencer
f9eabff001
For PR1067:
...
Update library documentation after removal of libLLVMTransforms.a that
resulted from removal of the LevelRaise pass.
llvm-svn: 33850
2007-02-04 00:17:35 +00:00
Chris Lattner
feec7137ce
Switch SelectionDAG::ReplaceAllUsesOfValueWith to use a SmallSetVector for
...
the users set (most nodes have 1 or 2 users). This speeds up the isel pass
3.2% on kimwitu.
llvm-svn: 33849
2007-02-04 00:14:31 +00:00
Chris Lattner
0732bec915
Various bugfixes
...
llvm-svn: 33848
2007-02-04 00:12:12 +00:00
Chris Lattner
0a165eedd1
describe SmallSetVector
...
llvm-svn: 33847
2007-02-04 00:00:26 +00:00
Chris Lattner
2b2b6c6c97
Convert SetVector to be a true adapter class and add SmallSetVector.
...
llvm-svn: 33846
2007-02-03 23:56:03 +00:00
Chris Lattner
6c344e56b1
remove some dead code
...
llvm-svn: 33845
2007-02-03 23:28:07 +00:00
Reid Spencer
8de97bba5a
For PR1072:
...
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.
llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Chris Lattner
7ccf30bb17
add an instcombine pass to clean up after heavy-lifting IP passes
...
llvm-svn: 33843
2007-02-03 23:06:03 +00:00
Chris Lattner
265345fc65
null -> pointer, nul -> character :)
...
llvm-svn: 33841
2007-02-03 22:04:27 +00:00
Reid Spencer
31882b8831
Fix some spellos.
...
llvm-svn: 33840
2007-02-03 21:06:43 +00:00
Chris Lattner
f043f7653e
fix grammar
...
llvm-svn: 33839
2007-02-03 20:17:53 +00:00
Chris Lattner
9dd7a380a8
Serious cleanups. Make the TOC match the text for the class hierarchy,
...
move the sections of the class-h around in the right order, make it actually
reflect the classes in LLVM today.
llvm-svn: 33838
2007-02-03 20:02:25 +00:00
Chris Lattner
4e406a9f8e
Add TOC
...
llvm-svn: 33837
2007-02-03 19:51:56 +00:00
Chris Lattner
f233c425cd
describe map-like containers
...
llvm-svn: 33836
2007-02-03 19:49:31 +00:00
Chris Lattner
db83265e3c
8 buckets is way too small to start out with. This was only for testing.
...
llvm-svn: 33835
2007-02-03 19:30:48 +00:00
Reid Spencer
5458e0e135
Clean this up a bit: hide command unless verbose output requested, echo
...
a useful comment line, add a clean target.
llvm-svn: 33834
2007-02-03 16:09:12 +00:00
Evan Cheng
9d851fca1e
Add a test case.
...
llvm-svn: 33833
2007-02-03 09:14:10 +00:00
Evan Cheng
456db39ea9
ARM callseq_end should have a input flag operand so it would be scheduled right after the call.
...
llvm-svn: 33832
2007-02-03 09:11:58 +00:00
Evan Cheng
4b6c8f7f5e
Fix comments.
...
llvm-svn: 33831
2007-02-03 08:53:01 +00:00
Chris Lattner
68b0ec54c2
improve grammar
...
llvm-svn: 33830
2007-02-03 08:20:15 +00:00
Chris Lattner
f5ddd043d6
improve grammar
...
llvm-svn: 33829
2007-02-03 08:10:45 +00:00
Chris Lattner
cb292fc808
close run-away tag
...
llvm-svn: 33828
2007-02-03 07:59:51 +00:00
Chris Lattner
ac76029f91
fill in the section on Set-like containers.
...
llvm-svn: 33827
2007-02-03 07:59:07 +00:00
Chris Lattner
694e110a2e
fix validation issues
...
llvm-svn: 33823
2007-02-03 03:06:52 +00:00
Chris Lattner
099213becc
fix validation problems
...
llvm-svn: 33822
2007-02-03 03:05:57 +00:00
Chris Lattner
9d9985cab5
Add some notes about choice of container.
...
llvm-svn: 33821
2007-02-03 03:04:03 +00:00
Chris Lattner
a025ab9fa8
remove a dead header
...
llvm-svn: 33820
2007-02-03 03:02:10 +00:00
Bill Wendling
a883f55eca
Moved the GetTargetRelocation method from PPCMachOWriter to here. It uses
...
non-Mach-O-specific information.
llvm-svn: 33819
2007-02-03 02:41:58 +00:00
Bill Wendling
2c350921e2
Moved the GetTargetRelocation method to the PPCMachOWriterInfo object. The
...
PPCMachOWriter is now trivial.
llvm-svn: 33818
2007-02-03 02:40:57 +00:00
Bill Wendling
c85e32c730
Put destructor out-of-line.
...
llvm-svn: 33817
2007-02-03 02:40:10 +00:00
Bill Wendling
c27c70dc3d
Pass in non-Mach-O-specific parameters to the GetTargetRelocation method.
...
llvm-svn: 33816
2007-02-03 02:39:40 +00:00
Bill Wendling
f382ea30fd
Added GetTargetRelocation method.
...
llvm-svn: 33815
2007-02-03 02:38:57 +00:00
Bill Wendling
0ceb8bb770
Added some accessor methods.
...
llvm-svn: 33814
2007-02-03 02:38:15 +00:00
Bill Wendling
761d275c35
Moved MachORelocation to its own header file. Have a call through the
...
TargetMachOInfo object to the GetTargetRelocation method. Pass into it
non-Mach-O-specific parameters.
llvm-svn: 33813
2007-02-03 02:37:51 +00:00
Bill Wendling
98ea0ea39e
New file for the MachORelocation structure. It doesn't have to be tied to the
...
MachOWriter.h file.
llvm-svn: 33812
2007-02-03 02:36:17 +00:00
Evan Cheng
36d559d369
- Branch max. displacement calculation bug.
...
- Add debugging info.
llvm-svn: 33811
2007-02-03 02:08:34 +00:00
Chris Lattner
0a30b1f00f
switch the sched unit map over to use a DenseMap instead of std::map. This
...
speeds up isel as a whole time by 2.6%.
llvm-svn: 33810
2007-02-03 01:34:13 +00:00
Chris Lattner
e83030b9c8
Switch ComputeTopDownOrdering over to using a densemap. This speeds up
...
isel as a whole by 3.3%.
llvm-svn: 33809
2007-02-03 01:12:36 +00:00
Evan Cheng
bcc6db26e1
__builtin_isunordered test case.
...
llvm-svn: 33808
2007-02-03 00:50:45 +00:00
Reid Spencer
04c5761386
For PR1152:
...
Update documentation to reflect that this isn't a full-blown executable
any more.
llvm-svn: 33807
2007-02-03 00:44:47 +00:00
Evan Cheng
f309d13677
Pasto
...
llvm-svn: 33806
2007-02-03 00:43:46 +00:00
Reid Spencer
2e2e43edf4
And even more correctly.
...
llvm-svn: 33805
2007-02-03 00:33:26 +00:00
Reid Spencer
dc83457a78
Format the examples correctly.
...
llvm-svn: 33804
2007-02-03 00:32:23 +00:00
Reid Spencer
f3293bad2e
For PR1152:
...
Update documentation to reflect addition of gccas functionality into opt.
llvm-svn: 33803
2007-02-03 00:21:56 +00:00
Lauro Ramos Venancio
1a0ae50528
Improves alloca test. Verifies SP restoration.
...
llvm-svn: 33802
2007-02-03 00:16:21 +00:00
Chris Lattner
1bfc7ab6a7
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
...
speeds up the inliner 16%.
llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Lauro Ramos Venancio
b739f7d337
bugfix: SP isn't resetted when function has FP and there is no spills.
...
llvm-svn: 33800
2007-02-02 23:08:40 +00:00
Chris Lattner
fc8190dbb7
Switch this back to using an std::map. DenseMap entries are getting invalidated
...
llvm-svn: 33799
2007-02-02 22:36:16 +00:00
Reid Spencer
697f1104e7
Two improvements:
...
1. Allow -- as well as - options (Bill Wendling)
2. Pass unrecognized options to opt and let it handle the errors, if any
(Chris Lattner).
llvm-svn: 33798
2007-02-02 21:49:27 +00:00
Chris Lattner
f4af392bd9
silence annoying warning in release-asserts build
...
llvm-svn: 33797
2007-02-02 21:19:18 +00:00
Chris Lattner
37d400a83d
Remove more malloc thrashing, this speeds up IPSCCP on kimwitu another 6.7%.
...
llvm-svn: 33796
2007-02-02 21:15:06 +00:00
Evan Cheng
f089c99f1d
Another thumb large stack offset codegen bug.
...
llvm-svn: 33795
2007-02-02 21:08:39 +00:00
Chris Lattner
3e667f3e61
Convert an std::set to SmallSet, this speeds up IPSCCP 17% on kimwitu.
...
llvm-svn: 33794
2007-02-02 20:57:39 +00:00
Chris Lattner
0e7ec675da
eliminate a malloc/free for (almost) every GEP processed. This speeds up
...
IPSCCP 3.3% on kimwitu.
llvm-svn: 33793
2007-02-02 20:51:48 +00:00
Chris Lattner
067d607e0e
switch hash_map's over to DenseMap in SCCP. This speeds up SCCP by 30% in
...
a release-assert build on kimwitu++.
llvm-svn: 33792
2007-02-02 20:38:30 +00:00
Chris Lattner
1a49acad38
add find/erase, add const iterators, fix bugs in iterators.
...
llvm-svn: 33791
2007-02-02 20:34:32 +00:00
Chris Lattner
5b8ecfdb89
add iterators
...
llvm-svn: 33790
2007-02-02 19:27:13 +00:00
Evan Cheng
d9d94700a4
Use MBB.empty() instead of MBB.size() for speed.
...
llvm-svn: 33789
2007-02-02 19:09:19 +00:00
Evan Cheng
3ad22567b3
Watch out for empty BB.
...
llvm-svn: 33788
2007-02-02 18:49:02 +00:00
Reid Spencer
583c90d4c2
For PR1152:
...
Step 2: Make plug compatible shell script to replace gccas binary.
llvm-svn: 33787
2007-02-02 15:50:58 +00:00
Reid Spencer
22dbfb626f
For PR1152:
...
Step 1: Copy gccas functionality to opt. This endows opt with a new
-std-compile-opts option to get the set of optimization passes that
gccas used. It also adds -disable-inlining and -disable-opt which
both apply only if -std-compile-opts is given. The -strip-debug option
was also removed. It just makes sure that "-strip" gets done early and
is mostly there for compatibility with gccas. Finally, a new
-verify-each option will cause the verify pass to be run after each pass.
llvm-svn: 33786
2007-02-02 14:46:29 +00:00
Reid Spencer
2f34b98cbf
Remove dead code and fix indentation per Chris' review comments.
...
llvm-svn: 33785
2007-02-02 14:41:37 +00:00
Reid Spencer
5dc84cdab7
Use short form of BinaryOperator create function.
...
llvm-svn: 33784
2007-02-02 14:09:34 +00:00
Reid Spencer
0d5f9237b6
Use short form of binary operator create functions.
...
llvm-svn: 33783
2007-02-02 14:08:20 +00:00
Reid Spencer
2ab0193da1
Put the Shift instructions in the right section.
...
llvm-svn: 33782
2007-02-02 13:57:07 +00:00
Reid Spencer
0cdd04fa90
Fix a comment that needed to change after SHIFT patch landed.
...
llvm-svn: 33781
2007-02-02 13:54:55 +00:00
Evan Cheng
fda6550545
Ugh. Only meant to do this in thumb mode.
...
llvm-svn: 33780
2007-02-02 08:58:48 +00:00
Chris Lattner
d5fea61d98
bugfix for reid's shift patch.
...
llvm-svn: 33779
2007-02-02 05:29:55 +00:00
Chris Lattner
2d5b4ac38f
add a note
...
llvm-svn: 33778
2007-02-02 04:36:46 +00:00
Reid Spencer
b958c7ec8a
1. Break long lines to 80 col limit
...
2. Fix indentation
3. Renumber the instruction opcodes after the Shift became a binary operator.
llvm-svn: 33777
2007-02-02 02:30:19 +00:00
Reid Spencer
2341c22ec7
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Evan Cheng
48b094d9dd
Fix a bug in getARMCMP (which translate CondCode to ARM specific CC) when the RHS is a constant.
...
llvm-svn: 33775
2007-02-02 01:53:26 +00:00
Evan Cheng
9b9e4ae796
Thumb does not have clz.
...
llvm-svn: 33773
2007-02-01 23:34:03 +00:00
Devang Patel
b8a29bdde9
Dump function names when debug-pass=Executions is used.
...
llvm-svn: 33772
2007-02-01 22:38:33 +00:00
Chris Lattner
c904205d28
Fix Transforms/InstCombine/2007-02-01-LoadSinkAlloca.ll, a serious code
...
pessimization where instcombine can sink a load (good for code size) that
prevents an alloca from being promoted by mem2reg (bad for everything).
llvm-svn: 33771
2007-02-01 22:30:07 +00:00
Chris Lattner
9a677c585c
new testcase for serious code pessimization
...
llvm-svn: 33770
2007-02-01 22:29:26 +00:00
Reid Spencer
26cc265311
My mistake, my environment wasn't up to date. This passes now.
...
llvm-svn: 33769
2007-02-01 22:26:42 +00:00
Reid Spencer
a5dc052682
XFAIL this on x86 linux as it continues to fail.
...
llvm-svn: 33768
2007-02-01 22:10:46 +00:00
Devang Patel
04bb891670
Pretty print pass managers.
...
llvm-svn: 33767
2007-02-01 22:10:12 +00:00
Devang Patel
f7fea8adf3
Pretty print pass manager
...
llvm-svn: 33766
2007-02-01 22:09:37 +00:00
Devang Patel
e3858e6674
cvs commit
...
llvm-svn: 33765
2007-02-01 22:08:25 +00:00
Reid Spencer
a8ee496f9e
Make sure the value passed to test function is initialized.
...
llvm-svn: 33764
2007-02-01 21:58:46 +00:00
Lauro Ramos Venancio
2c355da986
Define PrivateGlobalPrefix for ARM Linux. (Fix CodeGen/ARM/large_stack.ll)
...
llvm-svn: 33763
2007-02-01 21:43:53 +00:00
Evan Cheng
fd522996c8
Pasto. Lots of it.
...
llvm-svn: 33762
2007-02-01 20:44:52 +00:00
Reid Spencer
26c642de74
Ensure that ConvertOperandToType generates a result conversion by
...
initializing the Res variable to 0 and asserting it is not zero after the
result should have been created.
llvm-svn: 33761
2007-02-01 19:14:51 +00:00
Chris Lattner
ce494229a1
Fix bugs in the inliner having to do with single-entry phi nodes and valuemap
...
updating. These were exposed by Devang's recent passmgr changes (with
non-default passorderings) because now the inliner can be interleved with
the LCSSA pass.
llvm-svn: 33760
2007-02-01 18:48:38 +00:00
Lauro Ramos Venancio
903e01d407
Fix .thumb_func directive on linux.
...
llvm-svn: 33759
2007-02-01 18:25:34 +00:00
Jim Laskey
f970221c4d
Slip up
...
llvm-svn: 33758
2007-02-01 17:48:20 +00:00
Jim Laskey
894ceb1c6f
Emit labels as label_n and not as debug_n
...
llvm-svn: 33757
2007-02-01 17:46:10 +00:00
Andrew Lenharth
dd924e4e95
preserve sections of globals
...
llvm-svn: 33756
2007-02-01 17:12:54 +00:00
Jim Laskey
c3de9b4b14
Support for non-landing pad exception handling.
...
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Reid Spencer
e15a8b7a55
Fix a homonymo in a comment.
...
llvm-svn: 33754
2007-02-01 12:09:51 +00:00
Evan Cheng
f9a4c690de
- Off by one bugs in maximum displacement calculation / testing.
...
- In thumb mode, a new constpool island BB size should be 4 + 2 to
compensate for the potential padding due to alignment requirement.
llvm-svn: 33753
2007-02-01 10:16:15 +00:00
Anton Korobeynikov
1b4e6015b4
Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
...
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144
llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Chris Lattner
8001a63281
Add a new dense hash table implementation
...
llvm-svn: 33751
2007-02-01 07:49:59 +00:00
Chris Lattner
4f5cdecde3
improve comments, add an assertion
...
llvm-svn: 33750
2007-02-01 05:33:21 +00:00
Chris Lattner
1003dc72b4
rename DenseMap to IndexedMap.
...
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner
dcdfa788b1
rename DenseMap -> IndexedMap.
...
llvm-svn: 33748
2007-02-01 05:28:10 +00:00
Chris Lattner
f14c76cf5d
silence some warnings when assertions are disabled.
...
llvm-svn: 33747
2007-02-01 04:59:37 +00:00
Chris Lattner
104fc7f823
silence warning
...
llvm-svn: 33746
2007-02-01 04:57:00 +00:00
Chris Lattner
296a83cefb
Fit in 80 columns
...
llvm-svn: 33745
2007-02-01 04:55:59 +00:00
Evan Cheng
06736d0f88
.set pc relative displacement bug: label should be moved down one instruction
...
to just before the add r1, pc:
Before:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
mov r1, #PCRELV0
add r1, pc
Now:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
mov r1, #PCRELV0
LPCRELL0:
add r1, pc
llvm-svn: 33744
2007-02-01 03:04:49 +00:00
Evan Cheng
0df1536173
Add a note.
...
llvm-svn: 33743
2007-02-01 02:46:20 +00:00
Evan Cheng
210cbc43a8
Add a test case.
...
llvm-svn: 33742
2007-02-01 02:27:24 +00:00
Evan Cheng
e724492566
Also set alignment of stack-based structs to 4 in thumb mode.
...
llvm-svn: 33741
2007-02-01 02:18:36 +00:00
Evan Cheng
c79b96b00d
Added a thumb vararg test.
...
llvm-svn: 33740
2007-02-01 01:56:43 +00:00
Evan Cheng
e7e966de5e
Special epilogue for vararg functions. We cannot do a pop to pc because
...
there follows a sp increment for the va register save region. Instead issue
a separate pop to another register, increment sp, and then return:
pop {r4, r5, r6, r7}
pop {r3}
add sp, #3 * 4
bx r3
llvm-svn: 33739
2007-02-01 01:49:46 +00:00
Devang Patel
df4e992af8
Add printVersion(). Linker can use it to print LLVM version number.
...
llvm-svn: 33738
2007-02-01 01:46:06 +00:00
Devang Patel
9eb2caaeb6
Add PrintVersionMessage() that tools can use to print version number
...
without exiting program.
llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Chris Lattner
e3eeb24a86
Emit a better assertion message for PR1133
...
llvm-svn: 33736
2007-02-01 01:21:12 +00:00
Devang Patel
ea0568392e
Include Makefile.config before testing OS.
...
llvm-svn: 33735
2007-02-01 01:18:57 +00:00
Evan Cheng
234e031e36
Pessmistically assume the .align 2 before the first constpool entry adds
...
two bytes padding.
llvm-svn: 33734
2007-02-01 01:09:47 +00:00
Evan Cheng
29f920877d
Possible JT improvements.
...
llvm-svn: 33733
2007-02-01 01:07:48 +00:00
Chris Lattner
f7937005a3
Fix CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll
...
llvm-svn: 33732
2007-02-01 00:39:08 +00:00
Chris Lattner
667ff4832e
new testcase
...
llvm-svn: 33731
2007-02-01 00:38:56 +00:00
Evan Cheng
b7a08adae6
Fix test case.
...
llvm-svn: 33730
2007-01-31 23:51:35 +00:00
Evan Cheng
ed81dea45b
Don't emit unnecessary .align directive.
...
llvm-svn: 33729
2007-01-31 23:39:39 +00:00
Evan Cheng
e5c19993cd
Handle an interesting corner case: the constpool_entry being reference is two
...
instructions away, i.e. its address is equal to PC.
%r0 = tLDRpci <cp#0>
bx
CONSTPOOL_ENTRY 0 <cp#0>, 4
llvm-svn: 33728
2007-01-31 23:35:18 +00:00
Evan Cheng
b0ff625a31
Don't want to add FramePtr to callee save spill list twice.
...
llvm-svn: 33727
2007-01-31 23:17:29 +00:00
Reid Spencer
dee14b50e4
Fix build breakage by using correct arguments to getIndexedType in the
...
GEP constructors.
llvm-svn: 33726
2007-01-31 22:30:26 +00:00
Evan Cheng
53ac41cd54
Fix test cases.
...
llvm-svn: 33725
2007-01-31 22:27:07 +00:00
Evan Cheng
6f1c20a8e6
Darwin ABI requires FP to point to stack slot of prev FP.
...
llvm-svn: 33724
2007-01-31 22:25:33 +00:00
Evan Cheng
2e309b15a7
Add entry.
...
llvm-svn: 33723
2007-01-31 22:11:38 +00:00
Evan Cheng
1c5837dc4a
Thumb add sp, #imm requires the immediate value be multiple of 4. For now,
...
change preferred alignment of short, byte, bool to 4.
llvm-svn: 33722
2007-01-31 22:08:40 +00:00
Evan Cheng
ffe1d9f7fa
Update comment.
...
llvm-svn: 33721
2007-01-31 22:06:44 +00:00
Reid Spencer
04e259be5c
Preview of the shift instructions becoming Binary Operators.
...
llvm-svn: 33720
2007-01-31 21:39:12 +00:00
Evan Cheng
d7e39eb443
Dead comment.
...
llvm-svn: 33719
2007-01-31 21:31:25 +00:00
Reid Spencer
e7422f6b8d
Add some debug output.
...
llvm-svn: 33718
2007-01-31 21:27:38 +00:00
Evan Cheng
0584836340
Thumb asm syntax does not want 's' suffix for flag setting opcodes.
...
llvm-svn: 33717
2007-01-31 20:12:31 +00:00
Chris Lattner
adb4954d9c
shutdown the app when done.
...
llvm-svn: 33716
2007-01-31 20:10:54 +00:00
Chris Lattner
416a8939c3
remove temporary vectors.
...
llvm-svn: 33715
2007-01-31 20:08:52 +00:00
Chris Lattner
245ed94b76
add missing ctor
...
llvm-svn: 33714
2007-01-31 20:08:34 +00:00
Chris Lattner
7a63e7a7ad
eliminate temporary vectors
...
llvm-svn: 33713
2007-01-31 20:07:32 +00:00
Chris Lattner
927653f27f
eliminate temporary vectors
...
llvm-svn: 33712
2007-01-31 19:59:55 +00:00
Evan Cheng
1f3fc4b3f0
When determining whether a pc relative branch / load displacement fits in the
...
instruction field, adjust it for PC value (4 for thumb, 8 for arm).
llvm-svn: 33711
2007-01-31 19:57:44 +00:00
Chris Lattner
3aefeb957b
eliminate a temporary vector while parsing gep's from bc files.
...
llvm-svn: 33710
2007-01-31 19:56:15 +00:00
Chris Lattner
37ebf9317b
A relatively simple PPC optimization.
...
llvm-svn: 33709
2007-01-31 19:49:20 +00:00
Chris Lattner
79807c3dfe
implement the new GEP instruction ctors.
...
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Evan Cheng
7169bd8784
Some comments.
...
llvm-svn: 33707
2007-01-31 18:29:27 +00:00
Evan Cheng
456928bbbc
ConstPool island bug: watch out for cases where UserMI is the last MI of the BB.
...
llvm-svn: 33706
2007-01-31 18:19:07 +00:00
Chris Lattner
4fc18a4cb8
Revert another incorrectly applied chunk, which fixes InstCombine/vec_insert_to_shuffle.ll
...
llvm-svn: 33705
2007-01-31 18:09:17 +00:00
Chris Lattner
5f8809078f
Fix a minor bug in my patch yesterday that broken ConstProp/bswap.ll
...
llvm-svn: 33704
2007-01-31 18:04:55 +00:00
Lauro Ramos Venancio
7ae4f5599e
ARM fix: Miscompilation when frame pointer can't be eliminated. Uninitialized frame pointer register is used.
...
llvm-svn: 33703
2007-01-31 13:12:46 +00:00
Evan Cheng
143576ddd2
Specify the right CC for comparison libcalls.
...
llvm-svn: 33702
2007-01-31 09:30:58 +00:00
Evan Cheng
53026f1d5a
Allow the target to override the ISD::CondCode that's to be used to test the
...
result of the comparison libcall against zero.
llvm-svn: 33701
2007-01-31 09:29:11 +00:00
Evan Cheng
98aa8cbf4e
Added O_F32 and O_64 in addition to UO_F32 and UO_64 even though by
...
default they call the same libgcc routine. The result of the calls are
"tested" differently.
llvm-svn: 33700
2007-01-31 09:26:31 +00:00
Evan Cheng
491fcdb49b
Observe -soft-float.
...
llvm-svn: 33699
2007-01-31 08:40:13 +00:00
Chris Lattner
0dbb13735e
minor cleanups. Fix off-by-one in accounting the number of nodes when the
...
table grows.
llvm-svn: 33698
2007-01-31 06:04:41 +00:00
Chris Lattner
d700d9dde4
shutdown at end of run
...
llvm-svn: 33697
2007-01-31 04:45:28 +00:00
Chris Lattner
55ce85c6f9
regenerate
...
llvm-svn: 33696
2007-01-31 04:44:08 +00:00
Chris Lattner
10aad380f9
eliminate a temporary vector
...
llvm-svn: 33695
2007-01-31 04:43:46 +00:00
Chris Lattner
64a2909f08
elimiante a temporary vector
...
llvm-svn: 33694
2007-01-31 04:42:05 +00:00
Chris Lattner
f96f4a874c
eliminate temporary vectors
...
llvm-svn: 33693
2007-01-31 04:40:53 +00:00
Chris Lattner
302116a5ec
Revise APIs for creating constantexpr GEPs to not require the use of vectors.
...
This allows us to eliminate many temporary vectors, and theirassociated malloc/free pairs.
llvm-svn: 33692
2007-01-31 04:40:28 +00:00
Chris Lattner
64488b1cc3
Revise APIs for creating constantexpr GEPs to not require the use of
...
vectors. This allows us to eliminate many temporary vectors, and their
associated malloc/free pairs.
llvm-svn: 33691
2007-01-31 04:39:29 +00:00
Evan Cheng
345877e77c
- Added Thumb constpool island support.
...
- Islands are inserted right after the user MI since thumb LDR cannot encode
negative offset.
llvm-svn: 33690
2007-01-31 02:22:22 +00:00
Reid Spencer
2970eeb003
Fix version information for new instructions.
...
llvm-svn: 33689
2007-01-31 01:18:59 +00:00
Chris Lattner
aa17576933
Move symbolic constant folding code to libanalysis.
...
llvm-svn: 33688
2007-01-31 00:53:10 +00:00
Chris Lattner
44d68b9af7
Move some symbolic constant folding code out of instcombine into a place
...
it can be used by multiple clients. This specifically allows the inliner
to constant fold symbolically.
llvm-svn: 33687
2007-01-31 00:51:48 +00:00
Reid Spencer
216b9e3896
Correct the instruction op codes to meet current head changes.
...
llvm-svn: 33686
2007-01-31 00:38:46 +00:00
Reid Spencer
8ad541d5a8
Excise documentation about Compaction Tables.
...
llvm-svn: 33685
2007-01-31 00:26:08 +00:00
Chris Lattner
373dee0947
The local "ConstantFold" method is now just a watered down version of
...
ConstantFoldInstOperands. Switch to ConstantFoldInstOperands and remove
ConstantFold.
llvm-svn: 33683
2007-01-30 23:52:44 +00:00
Chris Lattner
86e359e5cb
Make this a *real* header:
...
1. Remove using namespace llvm;
2. Remove unneeded #includes.
3. Add #include guard.
Also add prototypes for new code moved from transformutils to libanalysis.
llvm-svn: 33682
2007-01-30 23:47:35 +00:00
Chris Lattner
ec84c162d8
move constant folding code out of Utils/Local into libanalysis
...
llvm-svn: 33681
2007-01-30 23:46:43 +00:00
Chris Lattner
024f4ab383
Adjust #includes to match movement of constant folding code from transformutils to libanalysis.
...
llvm-svn: 33680
2007-01-30 23:46:24 +00:00
Chris Lattner
2ae054adb0
move a bunch of constant folding code f rom Transforms/Utils/Local.cpp into
...
libanalysis/ConstantFolding.cpp.
llvm-svn: 33679
2007-01-30 23:45:45 +00:00
Chris Lattner
14789a92e1
remove now-dead code.
...
llvm-svn: 33678
2007-01-30 23:29:47 +00:00
Chris Lattner
f94bed3f13
the inliner pass now passes targetdata down through the inliner api's
...
llvm-svn: 33677
2007-01-30 23:28:39 +00:00
Chris Lattner
ad84a730ba
The inliner/cloner can now optionally take TargetData info, which can be
...
used by constant folding.
llvm-svn: 33676
2007-01-30 23:22:39 +00:00
Chris Lattner
a94523df7b
reformat comment
...
llvm-svn: 33675
2007-01-30 23:16:22 +00:00
Chris Lattner
e3eda25641
pass TD to constant folding apis
...
llvm-svn: 33674
2007-01-30 23:16:15 +00:00
Chris Lattner
8dbea5454d
adjust to constant folding api changes.
...
llvm-svn: 33673
2007-01-30 23:15:43 +00:00
Chris Lattner
0d74d3c09b
use smallvector instead of vector to make constant folding a bit more efficient
...
llvm-svn: 33672
2007-01-30 23:15:19 +00:00
Chris Lattner
6fc4b46d43
adjust to api change
...
llvm-svn: 33671
2007-01-30 23:14:52 +00:00
Chris Lattner
2c4610e4ca
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
In some cases, switch to using a SmallVector instead of a vector.
This allows us to get rid of some special case gross code that was there
to avoid the cost of constructing a vector.
llvm-svn: 33670
2007-01-30 23:13:49 +00:00
Chris Lattner
1e6cf2ee3c
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
llvm-svn: 33669
2007-01-30 23:12:47 +00:00
Evan Cheng
421fdb2a7e
Combine two tests.
...
llvm-svn: 33668
2007-01-30 23:06:22 +00:00
Evan Cheng
dd7a688bb8
During PEI, if the immediate value of sp + offset is too large (i.e. something
...
that would require > 3 instructions to materialize), load the immediate from a
constpool entry.
llvm-svn: 33667
2007-01-30 23:01:46 +00:00
Chris Lattner
2b15f2ba9d
remove some bits that are not yet meant to land.
...
llvm-svn: 33666
2007-01-30 22:50:32 +00:00
Chris Lattner
4284f6463a
Symbolically evaluate constant expressions like &A[123] - &A[4].f.
...
This occurs in C++ code like:
#include <iostream>
#include <iterator>
int a[] = { 1, 2, 3, 4, 5 };
int main() {
using namespace std;
copy(a, a + sizeof(a)/sizeof(a[0]), ostream_iterator<int>(cout, "\n"));
return 0;
}
Before we would decide the loop trip count is:
sdiv (i32 sub (i32 ptrtoint (i32* getelementptr ([5 x i32]* @a , i32 0, i32 5) to i32), i32 ptrtoint ([5 x i32]* @a to i32)), i32 4)
Now we decide it is "5". Amazing.
This code will need to be refactored, but I'm doing that as a separate
commit.
llvm-svn: 33665
2007-01-30 22:32:46 +00:00
Evan Cheng
83f35170fa
- Fix codegen for pc relative constant (e.g. JT) in thumb mode:
...
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
add r1, pc, #PCRELV0
This is not legal since add r1, pc, #c requires the constant be a multiple of 4.
Do the following instead:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
mov r1, #PCRELV0
add r1, pc
- In thumb mode, it's not possible to use .set generate a pc relative stub
address. The stub is ARM code which is in a different section from the thumb
code. Load the value from a constpool instead.
- Some asm printing clean up.
llvm-svn: 33664
2007-01-30 20:37:08 +00:00
Reid Spencer
5301e7c605
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Reid Spencer
3a0bbb0a4d
Compaction tables no longer supported, remove its block ID.
...
llvm-svn: 33662
2007-01-30 19:37:26 +00:00
Reid Spencer
f1826e2adf
Bye, Bye Compaction Tables. The benefit compaction tables provides doesn't
...
outweight its computational costs. This patch removes all compaction
table handling from the bcreader and bcwriter. For the record, here's the
difference betweeen having and not having compaction tables for some tests:
Test With Without Size Chg
Olden/mst 5,602 5,598 +0.1%
viterbi 18,026 17,795 +1.3%
obsequi 162,133 166,663 -2.8%
burg 224,090 228,148 -1.8%
kimwitu++ 4,933,263 5,121,159 -3.8%
176.gcc 8,470,424 9,141,539 -7.3%
It seems that it is more beneficial to larger files, but even on the largest
test case we have (176.gcc) it only amounts ot an I/O saving of 7.3%.
llvm-svn: 33661
2007-01-30 19:36:46 +00:00
Reid Spencer
af6a408117
For PR411:
...
Update these tests to not use the same name even though the type of the
value differs. After PR411 hits, type planes will be gone and it will be
illegal for a name to be used twice, regardless of type.
llvm-svn: 33660
2007-01-30 16:16:01 +00:00
Reid Spencer
6f880918d0
Add a gxxcmd variable for the g++ command line used to build llvm.
...
llvm-svn: 33659
2007-01-30 16:06:55 +00:00
Evan Cheng
95b85e34ff
Copy and paste bug.
...
llvm-svn: 33658
2007-01-30 08:22:33 +00:00
Evan Cheng
0e083d0161
Darwin -static should codegen static ctors / dtors to .constructor / .destructor sections.
...
llvm-svn: 33657
2007-01-30 08:04:53 +00:00
Evan Cheng
ce8fa3ed83
Misseed thumb jumptable branch.
...
llvm-svn: 33656
2007-01-30 08:03:06 +00:00
Reid Spencer
6ebc06f702
Make the input legal.
...
llvm-svn: 33655
2007-01-30 06:32:25 +00:00
Evan Cheng
fcb9b8b0b7
Add / merge tests.
...
llvm-svn: 33654
2007-01-30 03:06:19 +00:00
Evan Cheng
e43ca022bf
In thumb mode, round up stack frame size to multiple of 4 since add/sub
...
sp, imm instructions implicitly multiply the offset by 4.
llvm-svn: 33653
2007-01-30 02:57:02 +00:00
Evan Cheng
c419d983d6
Thumb eliminateFrameIndex fixes.
...
llvm-svn: 33652
2007-01-30 02:36:01 +00:00
Evan Cheng
1cd3c0efb8
Change the operand orders to t_addrmode_s* to make it easier to morph
...
instructions that use these address modes to instructions that use
t_addrmode_sp.
llvm-svn: 33651
2007-01-30 02:35:32 +00:00
Evan Cheng
7fa6964dc2
- In thumb mode, if size of MachineFunction is >= 2048, force LR to be
...
spilled (if it is not already).
- If LR is spilled, use BL to implement far jumps. LR is not used as a GPR
in thumb mode so it can be clobbered if it is properly spilled / restored
in prologue / epilogue.
- If LR is force spilled but no far jump has been emitted, try undo'ing the
spill by:
push lr -> delete
pop pc -> bx lr
llvm-svn: 33650
2007-01-30 01:18:38 +00:00
Evan Cheng
863736b0ad
Use BL to implement Thumb far jumps.
...
llvm-svn: 33649
2007-01-30 01:13:37 +00:00
Chris Lattner
6acab41ede
test that the 'ir' constraint works.
...
llvm-svn: 33646
2007-01-29 23:55:20 +00:00
Evan Cheng
760c68b8af
Factor GetInstSize() out of constpool island pass.
...
llvm-svn: 33644
2007-01-29 23:45:17 +00:00
Chris Lattner
d27f95e08d
add initial support for handling inline asms with multiple constraints.
...
This doesn't do the "right thing" but will probably work in most cases.
This implements CodeGen/PowerPC/2007-01-29-lbrx-asm.ll.
llvm-svn: 33643
2007-01-29 23:45:14 +00:00
Chris Lattner
9699e54088
new testcase
...
llvm-svn: 33642
2007-01-29 23:45:03 +00:00
Jim Laskey
ee23de6c36
Out of line function.
...
llvm-svn: 33641
2007-01-29 23:40:33 +00:00
Devang Patel
b64c433619
Use StartPassTimer() and StopPassManager()
...
llvm-svn: 33640
2007-01-29 23:29:54 +00:00
Jim Laskey
3f9f250928
Only gather frame info if debug or eh.
...
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Devang Patel
1c3633e461
- Undo previous check-in (i.e. Do not export TimingInfo class through
...
PassManagers.h).
- Add StopPassTimer() and StartPassTimer() to expose TimingInfo to
CallGraphPassManager
- Use these two APIs in CalLgraphPassManager to measure timings.
llvm-svn: 33638
2007-01-29 23:10:37 +00:00
Nate Begeman
eda5997cc8
Finish off bug 680, allowing targets to custom lower frame and return
...
address nodes.
llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Nate Begeman
e3b09fbbb0
We'd still like to register allocate r2 on darwin before the callee-save
...
regs.
llvm-svn: 33635
2007-01-29 22:57:48 +00:00
Jim Laskey
52726f5837
rename flag
...
llvm-svn: 33634
2007-01-29 22:40:03 +00:00
Evan Cheng
8953edc8a5
Comment.
...
llvm-svn: 33633
2007-01-29 22:23:02 +00:00
Evan Cheng
43e8518d8b
Remember if LR register has been spilled in this function.
...
llvm-svn: 33632
2007-01-29 22:22:24 +00:00
Anton Korobeynikov
b8d8b82950
Save all registers by default, as they can be used to pass parameters
...
for "inreg" calls
llvm-svn: 33631
2007-01-29 21:28:01 +00:00
Nate Begeman
17f250005a
Update some of the llvm in the readme
...
llvm-svn: 33630
2007-01-29 21:21:22 +00:00
Nate Begeman
2a562ba47b
Properly support cstrings
...
llvm-svn: 33629
2007-01-29 21:20:42 +00:00
Jim Laskey
d1154860a4
Flag to control exception handling.
...
llvm-svn: 33628
2007-01-29 20:48:32 +00:00
Devang Patel
5a4a315aed
Measure timings.
...
llvm-svn: 33627
2007-01-29 20:08:03 +00:00
Devang Patel
55bcb50840
Move TimingInfo into PassManagers.h so that other libs can use it.
...
llvm-svn: 33626
2007-01-29 20:06:26 +00:00
Jim Laskey
18c3b5267d
Disable zero landing pads for now.
...
llvm-svn: 33625
2007-01-29 20:01:41 +00:00
Reid Spencer
bae85637c7
Regenerate.
...
llvm-svn: 33624
2007-01-29 19:08:46 +00:00
Reid Spencer
e87c917a69
For PR1142:
...
When an unresolved definition is found, check to see if it is only unresolved
because the csretcc was upgraded to the sret param attribute. Such changes
change the function type and lead to unresolved definitions. In such cases, just
cast the function to the type expected by the CallInst. That is, cast to the
version of the function that has the sret param attribute.
llvm-svn: 33623
2007-01-29 19:07:18 +00:00
Jim Laskey
b4a2f05d1c
Landing pad-less eh for PPC.
...
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Jim Laskey
c8397b9214
Update project
...
llvm-svn: 33621
2007-01-29 18:45:08 +00:00
Reid Spencer
42b2c08e3a
Remove tabs.
...
llvm-svn: 33620
2007-01-29 17:55:50 +00:00
Reid Spencer
1e960cd4fd
Implement use of new IntrinsicLowering interface.
...
llvm-svn: 33619
2007-01-29 17:51:02 +00:00
Reid Spencer
d7035b654b
Use TargetData to obtain the correct size of the "size_t" argument for
...
functions like memcpy, memmove and memset. Ensure only one prototype is
used for these functions and that it matches the system definition by
using the appropriate type for the size argument.
llvm-svn: 33618
2007-01-29 17:42:06 +00:00
Reid Spencer
34dbbca483
IntrinsicLowering now requires TargetData.
...
llvm-svn: 33617
2007-01-29 17:39:50 +00:00
Jim Laskey
d33e5a822b
Update project.
...
llvm-svn: 33616
2007-01-29 15:09:35 +00:00
Reid Spencer
c3eba3fc93
Regenerate.
...
llvm-svn: 33615
2007-01-29 05:41:34 +00:00
Reid Spencer
8714f0025c
Upgrade old csret calling convention into sret parameter attribute.
...
llvm-svn: 33614
2007-01-29 05:41:09 +00:00
Reid Spencer
ccef5a35bf
Update this test case to look for sret parameter attribute not csret cc.
...
llvm-svn: 33613
2007-01-29 05:40:02 +00:00
Nick Lewycky
56639800c9
Simplify names of lattice values. SGTUNE becomes SGT, for example.
...
Fix initializeConstant, now initializeInt. Fixes major performance
bottleneck.
X == Y || X->DominatedBy(Y) is redundant. Remove the X == Y part.
Fix crasher in makeEqual where getOrInsertNode would add a new constant,
producing an NE relationship between the two members we're trying to make
equal. This now allows us to mark more BBs as unreachable.
llvm-svn: 33612
2007-01-29 02:56:54 +00:00
Chris Lattner
78bddc388c
Read from the right place.
...
llvm-svn: 33611
2007-01-29 02:18:13 +00:00
Chris Lattner
7f3bd82ab9
Fix PR1139
...
llvm-svn: 33610
2007-01-29 00:21:34 +00:00
Anton Korobeynikov
6843149863
Make doxygen happy
...
llvm-svn: 33609
2007-01-29 00:09:00 +00:00
Reid Spencer
c7765617d2
For PR1138:
...
Force memcpy to be the 32-bit variant. Since this is only used with
CBE and lli which both target 32-bit machines, this should be okay.
llvm-svn: 33608
2007-01-28 22:28:00 +00:00
Reid Spencer
326bf785a2
Adjust a comment to reflect reality.
...
llvm-svn: 33607
2007-01-28 22:26:42 +00:00
Anton Korobeynikov
06f7d4bec7
Arguments are counting from 1. not from 0. Maybe we should change
...
numbering somehow? E.g. make return argument the last?
llvm-svn: 33606
2007-01-28 18:01:49 +00:00
Anton Korobeynikov
9fa3839d29
More cleanup
...
llvm-svn: 33605
2007-01-28 16:04:40 +00:00
Nick Lewycky
eba26e463a
Drop CSRET from here too.
...
llvm-svn: 33604
2007-01-28 15:51:15 +00:00
Nick Lewycky
0c49722b36
Fix compile error "jump to case label crosses initialization".
...
What compiler are people using that accepts this code?
llvm-svn: 33603
2007-01-28 15:39:16 +00:00
Anton Korobeynikov
e93c6e8dca
Grammar fix
...
llvm-svn: 33602
2007-01-28 15:27:21 +00:00
Anton Korobeynikov
15f3028ba1
Merge error at my side. Fixed.
...
llvm-svn: 33601
2007-01-28 15:25:24 +00:00
Anton Korobeynikov
e816685bd5
Document 'inreg' & 'sret'
...
llvm-svn: 33600
2007-01-28 14:30:45 +00:00
Anton Korobeynikov
75e8a144d4
Regenerate
...
llvm-svn: 33599
2007-01-28 13:37:39 +00:00