Cameron Zwarich
5e3c712e67
Remove PHIElimination's private copy of SkipPHIsAndLabels.
...
llvm-svn: 120918
2010-12-04 20:40:15 +00:00
Benjamin Kramer
851691ddb2
Add patterns for the x86 popcnt instruction.
...
- Also adds a new POPCNT subtarget feature that is currently enabled if the target
supports SSE4.2 (nehalem) or SSE4A (barcelona).
llvm-svn: 120917
2010-12-04 20:32:23 +00:00
Bill Wendling
18e834f217
Silence 'may be used uninitialized in this function' warnings. Static analysis
...
may determine that they cannot be used uninitialized. But that might be a bit
too much for the compiler to determine.
llvm-svn: 120916
2010-12-04 20:20:34 +00:00
Michael J. Spencer
2cd429339f
Support/PathV2: Remove redundant calls to make_error_code.
...
llvm-svn: 120913
2010-12-04 18:45:32 +00:00
Benjamin Kramer
e2e8053264
APInt: microoptimize a few methods.
...
llvm-svn: 120912
2010-12-04 18:05:36 +00:00
Benjamin Kramer
009451fddc
Remove unneeded zero arrays.
...
llvm-svn: 120910
2010-12-04 15:28:22 +00:00
Benjamin Kramer
612c7225ee
Apparently APFloat::getZero doesn't like PPCDoubleDoubles.
...
llvm-svn: 120909
2010-12-04 14:43:08 +00:00
Benjamin Kramer
77faee6ba1
Simplify code. No functionality change.
...
llvm-svn: 120907
2010-12-04 14:22:24 +00:00
Bob Wilson
20c65a9d33
The Thumb tADDrSPi instruction is not valid when the destination is SP.
...
Check for that and try narrowing it to tADDspi instead. Radar 8724703.
llvm-svn: 120892
2010-12-04 04:40:19 +00:00
Rafael Espindola
9215947c83
There are two reasons why we might want to use
...
foo = a - b
.long foo
instead of just
.long a - b
First, on darwin9 64 bits the assembler produces the wrong result. Second,
if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not
consider a - b to be a constant but will if the dummy foo is created.
Split how we handle these cases. The first one is something MC should take care
of. The second one has to be handled by the caller.
llvm-svn: 120889
2010-12-04 03:21:47 +00:00
Michael J. Spencer
5a2272dcef
Support/FileSystem: Add status implementation.
...
llvm-svn: 120870
2010-12-04 00:32:40 +00:00
Michael J. Spencer
090a4bd632
Support/Windows/FileSystem: Fix MinGW warnings.
...
llvm-svn: 120868
2010-12-04 00:32:14 +00:00
Michael J. Spencer
e1360680ce
Support/FileSystem: Add file_size implementation.
...
llvm-svn: 120867
2010-12-04 00:31:48 +00:00
Rafael Espindola
50b6170457
Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoid
...
doing that if the target is darwin10 or newer.
This fixes
*) Direct object emission was producing objects without the workaround on
darwin9.
*) Assembly printing was producing objects with the workaround on linux.
llvm-svn: 120866
2010-12-04 00:31:13 +00:00
Jim Grosbach
4c10ffa7c3
Encode condition code for Thumb1 conditional branch instruction.
...
llvm-svn: 120865
2010-12-04 00:20:40 +00:00
Jim Grosbach
1dac8796d5
Correctly size-reduce the t2CMPzrr instruction to tCMPzr when possible.
...
tCMPzhir has undefined behavior when both source registers are low registers.
rdar://8728577
llvm-svn: 120858
2010-12-03 23:54:18 +00:00
Bill Wendling
7e27f17312
Use correct variable names to match the patterns.
...
llvm-svn: 120857
2010-12-03 23:44:24 +00:00
Jakob Stoklund Olesen
6f535251de
Also inore '()' while creating mdnode name from ObjC symbol name.
...
llvm-svn: 120856
2010-12-03 23:40:45 +00:00
Rafael Espindola
4145acdc3b
First step in fixing MC. Make it clear that we are avoiding a bug in the
...
darwin9 linker, what is needed to avoid it and where to get more information.
Also make the workaround simpler. Just the regular end_sequence we normally
create is more than 4 bytes.
Tested by building cctools and ld64 from darwin9 on a darwin10 system and using
those. I checked that I was able to reproduce the bootstrap failure when
the the workaround was disabled.
llvm-svn: 120854
2010-12-03 23:36:59 +00:00
Devang Patel
fdc570cad4
Ignore '+' while creating mdnode name from ObjC symbol name.
...
llvm-svn: 120853
2010-12-03 23:29:30 +00:00
Jim Grosbach
3b5c857f01
Match pattern operand names to expected encoding field names. This corrects the
...
operand encoding ordering of the instruction.
llvm-svn: 120852
2010-12-03 23:21:25 +00:00
Jim Grosbach
dbefb3e7e5
Remove incorrect BL target encoding (it's similar to, but not the same as the
...
ARM instruction). Add encoding of bits 13 and 11.
llvm-svn: 120849
2010-12-03 22:33:42 +00:00
Jim Grosbach
8cef570ed9
Encode the 32-bit wide Thumb (and Thumb2) instructions with the high order
...
halfword being emitted to the stream first. rdar://8728174
llvm-svn: 120848
2010-12-03 22:31:40 +00:00
Nate Begeman
d4310b6d7c
Revert this change since it breaks a couple of the AVX tests.
...
I'm unclear if the tests are actually correct or not, but reverting for now.
llvm-svn: 120847
2010-12-03 22:29:15 +00:00
Jakob Stoklund Olesen
8ed86d7fd3
Rename virtRegMap to avoid confusion with the VirtRegMap that it isn't.
...
llvm-svn: 120846
2010-12-03 22:25:09 +00:00
Jakob Stoklund Olesen
8b893e3575
Coalesce debug locations when possible, causing less DBG_VALUE instructions to
...
be emitted.
llvm-svn: 120845
2010-12-03 22:25:07 +00:00
Nate Begeman
deb26223bd
Scalar f32/f64 are also subregs of ymm regs
...
llvm-svn: 120844
2010-12-03 21:54:39 +00:00
Nate Begeman
3911dcfd71
Remove SSE1-4 disable when AVX is enabled. While this may be useful for development,
...
it completely breaks scalar fp in xmm regs when AVX is enabled.
llvm-svn: 120843
2010-12-03 21:54:14 +00:00
Jakob Stoklund Olesen
c18ef29bc6
Emit DBG_VALUE instructions from LiveDebugVariables.
...
llvm-svn: 120842
2010-12-03 21:47:10 +00:00
Jakob Stoklund Olesen
1d753a5f7f
Also update virtRegMap when renaming virtual registers.
...
llvm-svn: 120841
2010-12-03 21:47:08 +00:00
Jim Grosbach
c69ad2176a
When using the 'push' mnemonic for Thumb2 stmdb, be explicit when it's the
...
32-bit wide version by adding the .w suffix.
llvm-svn: 120838
2010-12-03 20:33:01 +00:00
Benjamin Kramer
e27eff8888
Remove unused variable.
...
llvm-svn: 120836
2010-12-03 19:55:37 +00:00
Jim Grosbach
c8ce9a3453
Reduce t2 ldr/str instructions to the correct t1 versions when there's an
...
immediate offset.
llvm-svn: 120833
2010-12-03 19:47:11 +00:00
Jason W Kim
27bbab7e31
fix ARM::fixup_arm_branch, cleanup, and share more code between ELF and Darwin
...
llvm-svn: 120832
2010-12-03 19:40:23 +00:00
Jim Grosbach
25da270139
No need to declare EncoderMethod property anymore; just assign to it.
...
llvm-svn: 120831
2010-12-03 19:31:00 +00:00
Jakob Stoklund Olesen
1ec6a68038
Delete the StrongPHIElimination pass, leaving only a shell.
...
The StrongPHIElimination pass did not work, and nobody has worked on it for two
years.
A rewrite is underway, so I am leaving this shell pass instead of deleting it
completely.
llvm-svn: 120830
2010-12-03 19:21:53 +00:00
Jakob Stoklund Olesen
4cd667151d
Add IntervalMap::iterator::set{Start,Stop,Value} methods that allow limited
...
editing of the current interval.
These methods may cause coalescing, there are corresponding set*Unchecked
methods for editing without coalescing. The non-coalescing methods are useful
for applying monotonic transforms to all keys or values in a map without
accidentally coalescing transformed and untransformed intervals.
llvm-svn: 120829
2010-12-03 19:02:00 +00:00
Michael J. Spencer
6cf89ea23a
Support/FileSystem: Add equivalent implementation.
...
llvm-svn: 120827
2010-12-03 18:49:13 +00:00
Michael J. Spencer
ce950c50c4
Support/FileSystem: Fix MinGW build. It doesn't have _chsize_s.
...
llvm-svn: 120826
2010-12-03 18:48:56 +00:00
Jim Grosbach
d0db6c9f0e
Add FIXMEs.
...
llvm-svn: 120824
2010-12-03 18:37:17 +00:00
Jim Grosbach
dca34b5da7
Size reduction for tPUSH come from t2STMDB_UPD, not t2STMIA_UPD.
...
llvm-svn: 120822
2010-12-03 18:31:03 +00:00
Michael J. Spencer
60c2f39a49
And I really hate line endings.
...
llvm-svn: 120821
2010-12-03 18:04:11 +00:00
Michael J. Spencer
94cf759d48
Support/Windows/FileSystem: Fix MinGW build.
...
llvm-svn: 120820
2010-12-03 18:03:28 +00:00
Michael J. Spencer
a0346605ae
Support/FileSystem: Add resize_file implementation.
...
llvm-svn: 120819
2010-12-03 17:54:07 +00:00
Michael J. Spencer
ba3176e790
Support/FileSystem: Add rename implementation.
...
llvm-svn: 120818
2010-12-03 17:53:55 +00:00
Michael J. Spencer
1d9a2b7541
Support/FileSystem: Add remove implementation.
...
llvm-svn: 120817
2010-12-03 17:53:43 +00:00
Michael J. Spencer
8c7c12a74e
Fix line endings.
...
llvm-svn: 120816
2010-12-03 17:53:23 +00:00
Eric Christopher
25f7b89a9e
Apparently OS X 10.4 doesn't have __crashreporter_info__.
...
Try to fix building on the wayback machine.
llvm-svn: 120801
2010-12-03 07:45:22 +00:00
Michael J. Spencer
98d9d1509e
Support/FileSystem: Add create_symlink implementation.
...
llvm-svn: 120800
2010-12-03 07:41:25 +00:00
Michael J. Spencer
efc69d250d
Support/FileSystem: Add create_hard_link implementation.
...
llvm-svn: 120792
2010-12-03 05:58:41 +00:00
Michael J. Spencer
5328e94513
Support/ADT/Twine: Make toNullTerminatedStringRef not rely on UB :(.
...
llvm-svn: 120791
2010-12-03 05:42:25 +00:00
Michael J. Spencer
96236c93ff
Support/FileSystem: Add create_director{y,ies} implementations.
...
llvm-svn: 120790
2010-12-03 05:42:11 +00:00
Rafael Espindola
ec560cdae3
Make EmitIntValue more efficient and more like what we do for leb128. The
...
difference is much smaller (about 0.3s) but significant.
llvm-svn: 120787
2010-12-03 02:54:21 +00:00
Bill Wendling
b7df584ef7
Don't overwrite the opcode passed into the T1Special pattern.
...
llvm-svn: 120782
2010-12-03 02:02:58 +00:00
Bill Wendling
c4858cb4c3
Add Thumb encoding for some more instructions.
...
llvm-svn: 120780
2010-12-03 01:55:47 +00:00
Michael J. Spencer
d9f355beb0
Support/Windows/FileSystem: Remove unneeded toNullTerminatedStringRef.
...
llvm-svn: 120777
2010-12-03 01:21:38 +00:00
Michael J. Spencer
4e1623c715
Support/FileSystem: Add unique_file and exists implementations.
...
llvm-svn: 120776
2010-12-03 01:21:28 +00:00
Rafael Espindola
dc103b1755
Do with uleb the same trick we now do with dwarf line/address advances. This
...
avoids creating leb128 fragments and speeds up the test in PR8711 to 33s.
llvm-svn: 120774
2010-12-03 01:19:49 +00:00
Rafael Espindola
3e119b0bb4
Try to resolve symbol differences early, and if successful create a plain
...
data fragment. This reduces the time to assemble the test in 8711 from 60s to
54s.
llvm-svn: 120767
2010-12-03 00:55:40 +00:00
Bill Wendling
2f6a820abe
The tLDR instruction wasn't encoded properly:
...
<MCInst 2251 <MCOperand Reg:70> <MCOperand Reg:66> <MCOperand Imm:0> <MCOperand Reg:0> <MCOperand Imm:14> <MCOperand Reg:0>>
Notice that the "reg" here is 0, which is an invalid register. Put a check in
the code for this to prevent crashing.
llvm-svn: 120766
2010-12-03 00:53:22 +00:00
Devang Patel
77a1457f1a
It may not be an option to skip .debug_line if there are file reference in already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries.
...
llvm-svn: 120760
2010-12-03 00:10:48 +00:00
Jim Grosbach
0bd3b0fd6c
Trailing whitespace.
...
llvm-svn: 120748
2010-12-02 23:05:38 +00:00
Devang Patel
822facd787
Use set directive for StartMinusEndExpr.
...
This is a fix for llvm-gcc-i386-darwin9 buildbot failure.
llvm-svn: 120742
2010-12-02 21:32:30 +00:00
Jakob Stoklund Olesen
08f52108b1
Update LiveDebugVariables during coalescing.
...
llvm-svn: 120720
2010-12-02 18:15:44 +00:00
Jim Grosbach
b6d0c8d5b1
When expanding the MOVCCi32imm, make sure to use the ARM movt/movw opcodes,
...
not thumb2.
llvm-svn: 120711
2010-12-02 16:42:25 +00:00
Jim Grosbach
78ef3199c8
Fix copy/pasto in vmin.f32 encoding.
...
llvm-svn: 120709
2010-12-02 16:30:58 +00:00
Wesley Peck
09a4bffe09
Teaching MBlaze backend how to reverse branch conditions.
...
llvm-svn: 120707
2010-12-02 16:17:11 +00:00
Rafael Espindola
922894345e
Add a fast path to EvaluateSymbolicAdd. This avoids computing symbol addresses
...
which then avoids running EnsureValid.
This cuts the assembly time of the testcase in PR8711 from 2:50 minutes to 1
minute.
llvm-svn: 120697
2010-12-02 07:53:12 +00:00
Rafael Espindola
2dabc56340
Move EmitValueToOffset to the ObjectStreamer.
...
llvm-svn: 120691
2010-12-02 05:59:38 +00:00
Rafael Espindola
3bc5d20c38
Add EmitInstToFragment to the generic object streamer.
...
llvm-svn: 120690
2010-12-02 05:44:06 +00:00
Rafael Espindola
41bdd97d48
The sections that the ELF object writer has to create are very simple and
...
contain only data. Handle them specially instead of using AddSectionToTheEnd.
This moves a hack from the generic assembler to the elf writer. It is also
a bit faster and should make other improvements easier.
llvm-svn: 120683
2010-12-02 03:09:06 +00:00
Devang Patel
525de51e78
If tehre are not any line entry then do not try to emit .debug_line section.
...
llvm-svn: 120637
2010-12-02 01:17:51 +00:00
Jakob Stoklund Olesen
54b6cd6d38
Implement the first half of LiveDebugVariables.
...
Scan the MachineFunction for DBG_VALUE instructions, and replace them with a
data structure similar to LiveIntervals. The live range of a DBG_VALUE is
determined by propagating it down the dominator tree until a new DBG_VALUE is
found. When a DBG_VALUE lives in a register, its live range is confined to the
live range of the register's value.
LiveDebugVariables runs before coalescing, so DBG_VALUEs are not artificially
extended when registers are joined.
The missing half will recreate DBG_VALUE instructions from the intervals when
register allocation is complete.
The pass is disabled by default. It can be enabled with the temporary command
line option -live-debug-variables.
llvm-svn: 120636
2010-12-02 00:37:37 +00:00
Jim Grosbach
0e71db6919
Add support for binary encoding of ARM 'adr' instructions referencing constant
...
pool entries (LEApcrel pseudo). Ongoing saga of rdar://8542291.
llvm-svn: 120635
2010-12-02 00:28:45 +00:00
Devang Patel
409a5ff824
Revert r120580.
...
llvm-svn: 120630
2010-12-02 00:22:29 +00:00
Evan Cheng
4118b24aca
Fix and re-enable tail call optimization of expanded libcalls.
...
llvm-svn: 120622
2010-12-01 22:59:46 +00:00
Rafael Espindola
c9af6aea7a
Remove unused argument.
...
llvm-svn: 120621
2010-12-01 22:48:11 +00:00
Jason W Kim
7d4b30652e
fixing style nit: move class static to global static
...
llvm-svn: 120619
2010-12-01 22:46:50 +00:00
Bill Wendling
d85ff071c0
Add a post encoder method to the VFP instructions to convert them to the Thumb2
...
encoding if we're in that mode.
llvm-svn: 120608
2010-12-01 21:54:50 +00:00
Jim Grosbach
b1b1ff4271
Use the correct fixup type for ARM VLDR*
...
llvm-svn: 120604
2010-12-01 21:09:40 +00:00
Rafael Espindola
16b64c646a
Rename temporary symbols if they conflict with artificial symbols created
...
by the assembler. This was blocking parsing any large .s produced by clang for
example.
Fixes PR8596.
llvm-svn: 120603
2010-12-01 20:46:11 +00:00
Michael J. Spencer
8908ec62e4
Support/FileSystem: Fix copy_file implementation to use toNullTerminatedStringRef
...
instead of toStringRef. The file system APIs need c strings.
llvm-svn: 120601
2010-12-01 20:37:42 +00:00
Michael J. Spencer
03bbd0f21d
Support/ADT/Twine: Add toNullTerminatedStringRef.
...
llvm-svn: 120600
2010-12-01 20:37:30 +00:00
Jim Grosbach
b2a12afa5f
Refactor LEApcrelJT as a pseudo-instructionlowered to a cannonical ADR
...
instruction at MC lowering. Add binary encoding information for the ADR,
including fixup data for the label operand.
llvm-svn: 120594
2010-12-01 19:47:31 +00:00
Michael J. Spencer
42a5674c7a
Support/FileSystem: Add copy_file implementation. Not tests yet because the
...
file creation APIs aren't implemented.
llvm-svn: 120593
2010-12-01 19:32:01 +00:00
Owen Anderson
8802c68592
Add correct encodings for STRD and LDRD, including fixup support. Additionally, update these to unified syntax.
...
llvm-svn: 120589
2010-12-01 19:18:46 +00:00
Jason W Kim
d468d24fc9
kill trailing space
...
llvm-svn: 120586
2010-12-01 19:07:22 +00:00
Jim Grosbach
538c57aeed
Fix a mised reloc rename spot.
...
llvm-svn: 120585
2010-12-01 19:02:26 +00:00
Jim Grosbach
25b2b536f3
10 bits, not 12.
...
llvm-svn: 120584
2010-12-01 18:51:32 +00:00
Devang Patel
e68cb5a5cf
Disable debug info for x86-darwin9 and earlier until PR 8715 and radar 8709290 are fixed.
...
llvm-svn: 120580
2010-12-01 16:59:34 +00:00
Duncan Sands
cd4f56b8e2
I don't think it makes any sense to assert that the target supports SSE3 here.
...
The user (i.e. whoever generated a call to the intrinsic in the first place) is
essentially asking for a particular instruction to be placed in the assembler.
If that instruction won't execute on the target machine, that's their problem
not ours. Two buildbots with processors that don't support SSE3 were barfing
on the apm.ll test in CodeGen/X86 because of this assertion.
llvm-svn: 120574
2010-12-01 12:58:13 +00:00
Che-Liang Chiou
c61d8fa0e3
ptx: bug fix: use after free
...
llvm-svn: 120571
2010-12-01 11:45:53 +00:00
Jay Foad
789e8ac4f7
PR5207: Rename overloaded APInt methods set(), clear(), flip() to
...
setAllBits(), setBit(unsigned), etc.
llvm-svn: 120564
2010-12-01 08:53:58 +00:00
Michael J. Spencer
1796028f41
Support/PathV2: Add is_{absolute,relative} implementation.
...
llvm-svn: 120560
2010-12-01 06:21:53 +00:00
Michael J. Spencer
5aa4703418
Support/PathV2: Add has_{root_path,root_name,root_directory,parent_path,filename,stem,extension} implementation.
...
llvm-svn: 120559
2010-12-01 06:03:50 +00:00
Jim Grosbach
a3e6ffffe5
Elaborate on FIXME.
...
llvm-svn: 120552
2010-12-01 04:01:17 +00:00
Jim Grosbach
b2044fcba1
Move the ARMAsmPrinter class defintiion into a header file.
...
llvm-svn: 120551
2010-12-01 03:45:07 +00:00
Michael J. Spencer
f6333e887f
Support/PathV2: Add extension implementation.
...
llvm-svn: 120550
2010-12-01 03:37:41 +00:00
Evan Cheng
84162760b7
Speculatively disable x86 portion of r120501 to appease the x86_64 buildbot.
...
llvm-svn: 120549
2010-12-01 03:27:20 +00:00
Michael J. Spencer
14039e9883
Support/PathV2: Add stem implementation.
...
llvm-svn: 120547
2010-12-01 03:18:33 +00:00
Michael J. Spencer
c3aaf36678
Support/PathV2: Add filename implementation.
...
llvm-svn: 120546
2010-12-01 03:18:17 +00:00
Bill Wendling
e62557dc3c
Remove "comparison of integers of different signs" warning by making the
...
variable unsigned.
llvm-svn: 120541
2010-12-01 02:49:04 +00:00
Michael J. Spencer
4beee08409
Support/PathV2: Add native implementation.
...
llvm-svn: 120539
2010-12-01 02:48:27 +00:00
Dan Gohman
3ff3bc0c31
Delete Path::appendSuffix's return value; it wasn't used anywhere, which
...
is fine since isn't really necessary to check isValid there anyway.
llvm-svn: 120538
2010-12-01 02:46:41 +00:00
Bill Wendling
4fc1c4ee84
General cleanups of comments.
...
llvm-svn: 120536
2010-12-01 02:42:55 +00:00
Jason W Kim
4d960e071c
ARM/MC/ELF relocation "hello world" for movw/movt.
...
Lifted adjustFixupValue() from Darwin for sharing w ELF.
Test added
TODO:
refactor ELFObjectWriter::RecordRelocation more.
Possibly share more code with Darwin?
Lots more relocations...
llvm-svn: 120534
2010-12-01 02:40:06 +00:00
Bill Wendling
b7635b1ed3
Formatting. It's all the rage!
...
llvm-svn: 120533
2010-12-01 02:36:55 +00:00
Bill Wendling
8861fb7484
More refactoring. This time the T1pI pattern.
...
llvm-svn: 120532
2010-12-01 02:28:08 +00:00
Eric Christopher
5f7eeae6ba
Refactor load/store handling again. Simplify and make some room for
...
reg+reg handling.
llvm-svn: 120526
2010-12-01 01:40:24 +00:00
Jan Wen Voung
c34fbc5bb1
Initialize an ARMConstantPoolValue field.
...
llvm-svn: 120525
2010-12-01 01:38:58 +00:00
Bill Wendling
ccfea264ff
s/T1pIEncode/T1pILdStEncode/g
...
s/T1pIEncodeImm/T1pILdStEncodeImm/g
llvm-svn: 120524
2010-12-01 01:38:08 +00:00
Bill Wendling
517dd72f06
Renaming variables to coincide with documentation. No functionality change.
...
llvm-svn: 120522
2010-12-01 01:32:02 +00:00
Chris Lattner
c3112f1e94
fix a bozo bug I introduced in r119930, causing a miscompile of
...
20040709-1.c from the gcc testsuite. I was using the size of a
pointer instead of the pointee. This fixes rdar://8713376
llvm-svn: 120519
2010-12-01 01:24:55 +00:00
Bill Wendling
8ebed2442e
Refactor T1sI and T1sIt encodings into helper classes.
...
llvm-svn: 120518
2010-12-01 01:20:15 +00:00
Michael J. Spencer
8d5c96c575
Support/PathV2: Add replace_extension implementation.
...
llvm-svn: 120514
2010-12-01 00:52:55 +00:00
Michael J. Spencer
5ac386d311
Support/PathV2: Add remove_filename implementation.
...
llvm-svn: 120513
2010-12-01 00:52:28 +00:00
Bill Wendling
60d0e1a06c
Refactor the T1sIt encodings into a parent class to get rid of all of the "let"
...
statements.
llvm-svn: 120512
2010-12-01 00:48:44 +00:00
Owen Anderson
2299afbb49
Use by-name rather than by-order matching for NEON operands.
...
llvm-svn: 120507
2010-12-01 00:28:25 +00:00
Andrew Trick
a2cec41172
Comment typo.
...
llvm-svn: 120504
2010-11-30 23:59:50 +00:00
Evan Cheng
f7e586d749
Enable sibling call optimization of libcalls which are expanded during
...
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://8707777
llvm-svn: 120501
2010-11-30 23:55:39 +00:00
Bill Wendling
6a48b15c80
Rename operands to match ARM documentation. No functionality change.
...
llvm-svn: 120500
2010-11-30 23:54:45 +00:00
Jim Grosbach
c8c81941f6
Fix typo.
...
llvm-svn: 120499
2010-11-30 23:51:41 +00:00
Chris Lattner
c888f3ec58
Enhance DSE to handle the variable index case in PR8657.
...
llvm-svn: 120498
2010-11-30 23:43:23 +00:00
Jim Grosbach
ce4e8350aa
Trailing whitespace.
...
llvm-svn: 120497
2010-11-30 23:29:24 +00:00
Michael J. Spencer
a10e76dd58
Support/PathV2: Implement reverse iteration and parent_path.
...
llvm-svn: 120496
2010-11-30 23:28:07 +00:00
Michael J. Spencer
090cf77d32
Support/ADT/StringRef: Add find_last_of.
...
llvm-svn: 120495
2010-11-30 23:27:35 +00:00
Jason W Kim
725321c3c7
Thanks to JimG for catching this!
...
llvm-svn: 120494
2010-11-30 23:27:18 +00:00
Andrew Trick
89dd5f7eac
Coding style. No significant functionality. Abandon linear scan style
...
in favor of the widespread llvm style. Capitalize variables and add
newlines for visual parsing. Rename variables for readability.
And other cleanup.
llvm-svn: 120490
2010-11-30 23:18:47 +00:00
Bill Wendling
745e2de9dc
Inline classes that were used in only one place.
...
llvm-svn: 120488
2010-11-30 23:16:25 +00:00
Chris Lattner
b9c5a6fa04
teach DSE to use GetPointerBaseWithConstantOffset to analyze
...
may-aliasing stores that partially overlap with different base
pointers. This implements PR6043 and the non-variable part of
PR8657
llvm-svn: 120485
2010-11-30 23:05:20 +00:00
Bill Wendling
e85934f8a5
* Add support for encoding t_addrmode_s2 and t_addrmode_s1. They are the same as
...
t_addrmode_s4, but with a different scaling factor.
* Encode the Thumb1 load and store instructions. This involved a bit of
refactoring (hi, Chris! :-). Some of the patterns became dead afterwards and
were removed.
llvm-svn: 120482
2010-11-30 22:57:21 +00:00
Owen Anderson
5aff471eb8
Simplify the encoding of reg+/-imm12 values that allow PC-relative encoding. This allows the
...
Thumb2 encoding to share code with the ARM encoding, which gets use fixup support for free.
It also allows us to fold away at least one codegen-only pattern.
llvm-svn: 120481
2010-11-30 22:45:47 +00:00
Jim Grosbach
09095b4dd9
Fix handling of ARM negative pc-relative fixups for loads and stores.
...
llvm-svn: 120480
2010-11-30 22:40:36 +00:00
Chris Lattner
58b829f94c
move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.h
...
llvm-svn: 120476
2010-11-30 22:25:26 +00:00
Chris Lattner
9471d70496
remove a fixed fixme
...
llvm-svn: 120474
2010-11-30 22:18:11 +00:00
Chris Lattner
5f5c9a75cb
Make DeleteDeadInstruction be a static function, move some code around.
...
llvm-svn: 120471
2010-11-30 21:58:14 +00:00
Eric Christopher
3a1c712e47
Move X86InstrFPStack.td over to PseudoI as well.
...
llvm-svn: 120470
2010-11-30 21:57:32 +00:00
Chris Lattner
e58643bcd7
switch RemoveAccessedObjects to use AliasAnalysis::Location to simplify
...
the code. We now get accurate sizes on Loads, though it surely doesn't
matter in practice.
llvm-svn: 120469
2010-11-30 21:47:58 +00:00
Chris Lattner
df852d098f
two improvements to RemoveAccessedObjects:
...
1. if the underlying pointer passed in can be resolved
to any argument or alloca, then we don't need to scan.
Previously we would only avoid the scan if the alloca
or byval was actually considered dead.
2. The dead store processing code is itself completely
dead and didn't handle volatile stores right anyway,
so delete it. This allows simplifying the interface
to RemoveAccessedObjects.
llvm-svn: 120467
2010-11-30 21:38:30 +00:00
Eric Christopher
b15c993a73
Migrate X86InstrControl.td to use PseudoI and fix a couple of 80-col violations
...
while I'm in there.
llvm-svn: 120466
2010-11-30 21:37:36 +00:00
Chris Lattner
c117c05b6e
remove the "undead" terminology, which is nonstandard and never
...
made sense to me. We now have a set of dead stack objects, and
they become live when loaded. Fix a theoretical problem where
we'd pass in the wrong pointer to the alias query.
llvm-svn: 120465
2010-11-30 21:32:12 +00:00
Chris Lattner
a4503a324b
move call handling in handleEndBlock up a bit, and simplify it.
...
If the call might read all the allocas, stop scanning early.
Convert a vector to smallvector, shrink SmallPtrSet to 16 instead
of 64 to avoid crazy linear scans.
llvm-svn: 120463
2010-11-30 21:18:46 +00:00
Dale Johannesen
1ab2213b84
Avoid exponential growth of a table. It feels like
...
there should be a better way to do this. PR 8679.
llvm-svn: 120457
2010-11-30 20:23:21 +00:00
Owen Anderson
20a6f2bd2e
Provide Thumb2 encodings for a few miscellaneous instructions.
...
llvm-svn: 120455
2010-11-30 20:00:01 +00:00
Chris Lattner
ac17f2b483
various cleanups and code simplification
...
llvm-svn: 120454
2010-11-30 19:48:15 +00:00
Chris Lattner
3512297c58
make getPointerSize a static function. Add ivars to DSE for
...
AA and MD pass info instead of using getAnalysis<> all over.
llvm-svn: 120453
2010-11-30 19:34:42 +00:00
Chris Lattner
7ae2f179c6
reduce indentation, clean up TD use a bit.
...
llvm-svn: 120452
2010-11-30 19:28:23 +00:00
Jim Grosbach
532d63789b
Add FIXME
...
llvm-svn: 120451
2010-11-30 19:25:56 +00:00
Owen Anderson
5f7b3e919b
Add encoding support for Thumb2 PLD and PLI instructions.
...
llvm-svn: 120449
2010-11-30 19:19:31 +00:00
Eric Christopher
95f0d1fe65
Noticed this on inspection, fix and update some comments.
...
llvm-svn: 120447
2010-11-30 19:14:07 +00:00