Dale Johannesen
d70bd61758
Generated code for generic expansion of SETUGT etc.
...
is noticeably worse than previous PPC-specific code.
Since the latter was also wrong in some cases and
correctness is more important than efficiency, I'm
disabling this test temporarily while I fix it.
llvm-svn: 58876
2008-11-08 00:49:19 +00:00
Dale Johannesen
ee04c24bd5
Xfail an incorrect test.
...
llvm-svn: 58875
2008-11-08 00:40:24 +00:00
Dale Johannesen
bb5c9b4b68
Make testb optimization work on big-endian targets.
...
llvm-svn: 58874
2008-11-08 00:01:16 +00:00
Evan Cheng
ef4d78ba67
More code clean up.
...
llvm-svn: 58872
2008-11-07 22:57:53 +00:00
Dale Johannesen
160be0ffda
Make FP tests requiring two compares work on PPC (PR 642).
...
This is Chris' patch from the PR, modified to realize that
SETUGT/SETULT occur legitimately with integers, plus
two fixes in LegalizeDAG to pass a valid result type into
LegalizeSetCC. The argument of TLI.getSetCCResultType is
ignored on PPC, but I think I'm following usage elsewhere.
llvm-svn: 58871
2008-11-07 22:54:33 +00:00
Evan Cheng
8467e2459a
Get PIC jump table working.
...
llvm-svn: 58869
2008-11-07 22:30:53 +00:00
Evan Cheng
077f686d4b
More debug output.
...
llvm-svn: 58868
2008-11-07 22:30:29 +00:00
Dan Gohman
cc0d2cfa01
Make tablegen print out a nice error message for a const char*
...
exception, like it does for a std::string exception.
llvm-svn: 58865
2008-11-07 21:01:13 +00:00
Dan Gohman
67feab3b5a
Document the acronym RAUW. Patch by Jonathan Brandmeyer!
...
llvm-svn: 58863
2008-11-07 20:29:17 +00:00
Duncan Sands
2d636b5265
Sign-extend rather than zero-extend when promoting
...
the condition for a BRCOND, according to what is
returned by getSetCCResultContents. Since all
targets return the same thing (ZeroOrOneSetCCResult),
this should be harmless! The point is that all over
the place the result of SETCC is fed directly into
BRCOND. On machines for which getSetCCResultContents
returns ZeroOrNegativeOneSetCCResult, this is a
sign-extended boolean. So it seems dangerous to
also feed BRCOND zero-extended booleans in some
circumstances - for example, when promoting the
condition.
llvm-svn: 58861
2008-11-07 20:13:04 +00:00
Dan Gohman
cb0df597e0
Flush the raw_ostream after emitting the assembly for a function.
...
This is a temporary fix for the -print-emitted-asm option, where
errs() is used as the stream, in the case where other code is
using stderr without using errs()' buffer. Hopefully soon we'll
fix errs() to be non-buffered instead. Patch by Preston Gurd.
llvm-svn: 58859
2008-11-07 19:49:17 +00:00
Dale Johannesen
9016882d67
Fix unsigned->ppcf128 conversion.
...
llvm-svn: 58856
2008-11-07 19:11:43 +00:00
Nick Lewycky
3707f1e6f3
Update to add newer bitcodes.
...
llvm-svn: 58852
2008-11-07 14:52:51 +00:00
Richard Osborne
75edafc672
Keep CREDITS.TXT sorted by name.
...
llvm-svn: 58845
2008-11-07 12:44:36 +00:00
Richard Osborne
5923f60099
Add contributer information for XCore backend to CREDITS.TXT
...
llvm-svn: 58844
2008-11-07 12:41:14 +00:00
Richard Osborne
7b2eae9bdd
Add XCore backend to CMake build.
...
llvm-svn: 58843
2008-11-07 12:37:45 +00:00
Richard Osborne
86d68a492a
Add basic test for XCore backend
...
llvm-svn: 58841
2008-11-07 11:24:12 +00:00
Richard Osborne
3219819ffe
Fix compile warnings.
...
llvm-svn: 58840
2008-11-07 11:21:09 +00:00
Scott Michel
3395d4485d
CellSPU: Ensure that C strings are always put in the .rodata section
...
llvm-svn: 58839
2008-11-07 11:06:44 +00:00
Richard Osborne
ca08e0645a
Add XCore backend.
...
llvm-svn: 58838
2008-11-07 10:59:00 +00:00
Evan Cheng
7095cd2af2
Jump table JIT support. Work in progress.
...
llvm-svn: 58836
2008-11-07 09:06:08 +00:00
Evan Cheng
00203155ad
Jump tables may be emitted by target.
...
llvm-svn: 58835
2008-11-07 09:02:17 +00:00
Evan Cheng
a2d1605ac3
Jump table relocation addresses may be resolved by target.
...
llvm-svn: 58834
2008-11-07 09:01:15 +00:00
Scott Michel
34d93f8572
Teach CellSPU about ELF sections and new section emitter classes.
...
NB: This is likely to need more work.
llvm-svn: 58832
2008-11-07 04:36:25 +00:00
Bill Wendling
b9656df4ac
BCUI + 1 doesn't work. Use next instead.
...
llvm-svn: 58830
2008-11-07 01:59:41 +00:00
Bill Wendling
1af23b035f
Refactor code that adjusts the offsets of stack objects.
...
llvm-svn: 58829
2008-11-07 01:48:58 +00:00
Evan Cheng
98dc53e926
Encode misc arithmetic instructions.
...
llvm-svn: 58828
2008-11-07 01:41:35 +00:00
Dale Johannesen
a129e0b826
Testcase for testb optimization.
...
llvm-svn: 58827
2008-11-07 01:30:18 +00:00
Devang Patel
b8e0d59ceb
Handle (delete) dbg intrinsics while promoting alloca.
...
llvm-svn: 58826
2008-11-07 01:30:07 +00:00
Dale Johannesen
7aad542d35
When we're doing a compare of load-AND-constant to 0
...
(e.g. a bitfield test) narrow the load as much as possible.
The has the potential to avoid unnecessary partial-word
load-after-store conflicts, which cause stalls on several targets.
Also a size win on x86 (testb vs testl).
llvm-svn: 58825
2008-11-07 01:28:02 +00:00
Bill Wendling
eb4268d72f
- Modify the stack protector algorithm so that the stack slot is allocated in
...
LLVM IR code and not in the selection DAG ISel. This is a cleaner solution.
- Fix the heuristic for determining if protectors are necessary. The previous
one wasn't checking the proper type size.
llvm-svn: 58824
2008-11-07 01:23:58 +00:00
Bill Wendling
87d0746e71
Remove unneeded header file.
...
llvm-svn: 58823
2008-11-06 23:56:59 +00:00
Bill Wendling
a0826e1855
Don't build a vector of returns. Just modify the Function in the loop.
...
llvm-svn: 58822
2008-11-06 23:55:49 +00:00
Mon P Wang
5ca2ec65bd
Fixed scalarizing an extract subvector and prevent an infinite loop
...
when simplify a vector.
llvm-svn: 58820
2008-11-06 22:52:21 +00:00
Bill Wendling
d939a7b305
The size limit is for individual arrays. So if any array has more than 8 bytes
...
in it, then emit stack protectors.
llvm-svn: 58819
2008-11-06 22:18:44 +00:00
Evan Cheng
49d665218c
Encode extend instructions; more clean up.
...
llvm-svn: 58818
2008-11-06 22:15:19 +00:00
Dan Gohman
193e4c025e
Fix a use of an invalid iterator when -debug-pass=Details is used.
...
llvm-svn: 58816
2008-11-06 21:57:17 +00:00
Bill Wendling
8b47c1e0a2
Don't recalculate the stack position of the stack protector.
...
llvm-svn: 58815
2008-11-06 21:37:09 +00:00
Devang Patel
8af0a362f1
Emit label for llvm.dbg.func.start of the inlined function.
...
llvm-svn: 58814
2008-11-06 21:28:20 +00:00
Devang Patel
ef21de946b
Clarify documentation. A module pass MP can require a function paqss FP only if FP does not require any module pass.
...
llvm-svn: 58813
2008-11-06 19:47:49 +00:00
Evan Cheng
aa03cd3336
- Improve naming consistency: Branch -> BrFrm, BranchMisc -> BrMiscFrm.
...
- Consolidate instruction formats.
- Other clean up.
llvm-svn: 58808
2008-11-06 17:48:05 +00:00
Evan Cheng
972fd1a1e0
Improve JIT debugging outputs format consistency.
...
llvm-svn: 58807
2008-11-06 17:46:04 +00:00
Nuno Lopes
2817338558
plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
...
llvm-svn: 58805
2008-11-06 16:21:49 +00:00
Duncan Sands
f178f8300d
Formating/comment changes - no functionality change.
...
llvm-svn: 58801
2008-11-06 08:51:32 +00:00
Evan Cheng
47b546d75f
Remove opcode from instruction TS flags; add MOVCC support; fix addrmode3 encoding bug.
...
llvm-svn: 58800
2008-11-06 08:47:38 +00:00
Bill Wendling
b3f7a39877
- Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.
...
- Get rid of "HasStackProtector" in MachineFrameInfo.
- Modify intrinsics to tell which are doing what with memory.
llvm-svn: 58799
2008-11-06 07:23:03 +00:00
Steve Naroff
ef625263ef
Update VC++ projects.
...
llvm-svn: 58798
2008-11-06 06:24:59 +00:00
Mon P Wang
9a8d60a7c0
Widening cleanup
...
llvm-svn: 58796
2008-11-06 05:31:54 +00:00
Evan Cheng
36ae40342f
Handle smul<x><y>, smulw<y>, smla<x><y>, smlaw<y>.
...
llvm-svn: 58793
2008-11-06 03:35:07 +00:00
Bill Wendling
43de293d75
Adjust the stack protector heuristic to care about only arrays or calls to
...
"alloca".
llvm-svn: 58792
2008-11-06 02:38:58 +00:00
Bill Wendling
d970ea3eac
Implement the stack protector stack accesses via intrinsics:
...
- stackprotector_prologue creates a stack object and stores the guard there.
- stackprotector_epilogue reads the stack guard from the stack position created
by stackprotector_prologue.
- The PrologEpilogInserter was changed to make sure that the stack guard is
first on the stack frame.
llvm-svn: 58791
2008-11-06 02:29:10 +00:00
Evan Cheng
b870fd8874
Fix so_imm encoding bug; add support for MOVi2pieces.
...
llvm-svn: 58790
2008-11-06 02:25:39 +00:00
Evan Cheng
2686c8fb34
Fix encoding of multiple instructions with 3 src operands; also handle smmul, smmla, and smmls.
...
llvm-svn: 58789
2008-11-06 01:21:28 +00:00
Evan Cheng
3aeeb3a47c
Need a \n.
...
llvm-svn: 58788
2008-11-06 01:18:29 +00:00
Devang Patel
5a5ab730e0
InstructionNamer preserves everything.
...
llvm-svn: 58787
2008-11-06 01:00:16 +00:00
Devang Patel
9e3e776e28
Emit label for llvm.dbg.func.start of the inlined function.
...
llvm-svn: 58786
2008-11-06 00:30:09 +00:00
Steve Naroff
0b0c99610c
Add post-build event for clangDriver (to copy clang.exe into "dstroot").
...
llvm-svn: 58783
2008-11-06 00:11:31 +00:00
Evan Cheng
d1c5c7f499
Undo 58778 but makes the binary dump prettier.
...
llvm-svn: 58782
2008-11-05 23:44:08 +00:00
Bill Wendling
f5f6f74c16
Add comments to function.
...
llvm-svn: 58781
2008-11-05 23:42:27 +00:00
Evan Cheng
fd2adbfa28
Encode pic load / store instructions; fix some encoding bugs.
...
llvm-svn: 58780
2008-11-05 23:22:34 +00:00
Evan Cheng
6158254d1d
Add command line option -entry-funcion to override entry function (default is main).
...
llvm-svn: 58779
2008-11-05 23:21:52 +00:00
Evan Cheng
51b9b9f6e2
Remove debug output that's not really useful.
...
llvm-svn: 58778
2008-11-05 23:21:11 +00:00
Dan Gohman
3777ed765f
Make ISel ignore dead nodes. The DAGCombiner normally eliminates
...
dead nodes, but in this case its missing one. Fixing the DAGCombiner
is desirable, but it's somewhat involved.
llvm-svn: 58777
2008-11-05 22:56:47 +00:00
Andrew Lenharth
912e7131a4
opt was not exporting the Mangler symbols
...
llvm-svn: 58775
2008-11-05 22:42:50 +00:00
Devang Patel
f53d7ff870
Add PR number.
...
llvm-svn: 58765
2008-11-05 18:41:15 +00:00
Evan Cheng
81889d010c
Restructure ARM code emitter to use instruction formats instead of addressing modes to determine how to encode instructions.
...
llvm-svn: 58764
2008-11-05 18:35:52 +00:00
Dan Gohman
ce2417f4e1
Use an assert to check that SelectCode isn't called on
...
nodes that are already selected.
llvm-svn: 58763
2008-11-05 18:30:52 +00:00
Dan Gohman
87002dbea1
The HadDelete field is no longer used.
...
llvm-svn: 58761
2008-11-05 17:35:14 +00:00
Dan Gohman
7a638a8c7e
Reintroduce a comment that was removed with the AddToISelQueue
...
changes.
llvm-svn: 58760
2008-11-05 17:16:24 +00:00
Dan Gohman
22079067e1
Update some comments to reflect the new code.
...
llvm-svn: 58759
2008-11-05 17:13:57 +00:00
Richard Osborne
bfd58d87f3
Test commit, add Makefile for XCore target, more to follow.
...
llvm-svn: 58755
2008-11-05 09:53:58 +00:00
Duncan Sands
68035d4076
Fix thinko in ppcf128 expansion of truncating store.
...
llvm-svn: 58753
2008-11-05 07:17:27 +00:00
Evan Cheng
27889ab29f
Add more vector move low and zero-extend patterns.
...
llvm-svn: 58752
2008-11-05 06:04:51 +00:00
Evan Cheng
c7b04a12bb
Type of shuffle mask has changed.
...
llvm-svn: 58751
2008-11-05 06:04:18 +00:00
Evan Cheng
3cd5e8c97b
Indentation.
...
llvm-svn: 58750
2008-11-05 06:03:38 +00:00
Dan Gohman
f14b77ebf1
Eliminate the ISel priority queue, which used the topological order for a
...
priority function. Instead, just iterate over the AllNodes list, which is
already in topological order. This eliminates a fair amount of bookkeeping,
and speeds up the isel phase by about 15% on many testcases.
The impact on most targets is that AddToISelQueue calls can be simply removed.
In the x86 target, there are two additional notable changes.
The rule-bending AND+SHIFT optimization in MatchAddress that creates new
pre-isel nodes during isel is now a little more verbose, but more robust.
Instead of either creating an invalid DAG or creating an invalid topological
sort, as it has historically done, it can now just insert the new nodes into
the node list at a position where they will be consistent with the topological
ordering.
Also, the address-matching code has logic that checked to see if a node was
"already selected". However, when a node is selected, it has all its uses
taken away via ReplaceAllUsesWith or equivalent, so it won't recieve any
further visits from MatchAddress. This code is now removed.
llvm-svn: 58748
2008-11-05 04:14:16 +00:00
Dan Gohman
fd820528ab
Use getTargetConstant instead of getConstant for nodes that should not be visited
...
by isel and potentially forced into registers.
llvm-svn: 58747
2008-11-05 02:06:09 +00:00
Evan Cheng
132de1983f
Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
...
indirect gv reference. Please don't call it lazy.
llvm-svn: 58746
2008-11-05 01:50:32 +00:00
Devang Patel
f04bfc6989
New test case.
...
llvm-svn: 58745
2008-11-05 01:40:30 +00:00
Devang Patel
f0ef35738c
Do now allow InlineAlways pass to remove dead functions.
...
llvm-svn: 58744
2008-11-05 01:39:16 +00:00
Devang Patel
e94321305f
Silence unused variable warnings.
...
llvm-svn: 58743
2008-11-05 01:37:40 +00:00
Devang Patel
7a848b0ee3
Check Attribute::NoInline.
...
llvm-svn: 58742
2008-11-05 01:37:05 +00:00
Bill Wendling
db045a3048
Remove dead variable.
...
llvm-svn: 58741
2008-11-05 00:56:35 +00:00
Bill Wendling
f1b4e2626b
Simplify the allocated size calculation.
...
llvm-svn: 58740
2008-11-05 00:54:27 +00:00
Bill Wendling
75e38fedc8
Fix comment
...
llvm-svn: 58739
2008-11-05 00:46:15 +00:00
Owen Anderson
26c10f1b4a
Use the new predicate to control when we do prealloc splitting. Fix a small bug.
...
llvm-svn: 58738
2008-11-05 00:32:13 +00:00
Evan Cheng
33ba5e78d2
Debugging output tweak.
...
llvm-svn: 58737
2008-11-05 00:22:28 +00:00
Oscar Fuentes
076e048cf7
CMake: updated list of source files.
...
llvm-svn: 58736
2008-11-05 00:11:22 +00:00
Bill Wendling
782e8346a5
Some code simplification. It now doesn't generate a prologue if the epilogue
...
isn't going to be generated.
llvm-svn: 58734
2008-11-05 00:00:21 +00:00
Dan Gohman
8cdea717a3
Add a new pass to simplify specific half_powr function calls. This is
...
a specialized pass that it not likely to be generally useful.
llvm-svn: 58732
2008-11-04 23:41:45 +00:00
Devang Patel
db9d785338
On darwin, 32-bit x86 target is i386-apple-darwin...
...
llvm-svn: 58731
2008-11-04 23:13:50 +00:00
Nuno Lopes
0460bb27e0
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
...
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager
llvm-svn: 58730
2008-11-04 23:03:58 +00:00
Anton Korobeynikov
d6948315b7
Fix tests not to emit IR output
...
llvm-svn: 58729
2008-11-04 23:02:39 +00:00
Bill Wendling
d31fc54f34
Small simplification of the stack guard type.
...
llvm-svn: 58728
2008-11-04 22:54:43 +00:00
Bill Wendling
2f40956c68
- Add a "getOrInsertGlobal" method to the Module class. This acts similarly to
...
"getOrInsertFunction" in that it either adds a new declaration of the global
and returns it, or returns the current one -- optionally casting it to the
correct type.
- Use the new getOrInsertGlobal in the stack protector code.
- Use "splitBasicBlock" in the stack protector code.
llvm-svn: 58727
2008-11-04 22:51:24 +00:00
Owen Anderson
a926ed4b50
First pass at checking for the creation of a new join point when doing pre-alloc splitting. This is not turned on yet.
...
llvm-svn: 58726
2008-11-04 22:22:41 +00:00
Evan Cheng
e3827d9061
Actually ARM / Mac OS X does have UINTTOFP_I64_F{64|32} libcalls.
...
llvm-svn: 58725
2008-11-04 22:19:55 +00:00
Bill Wendling
64adc71e9a
Update in response to feedback from Chris:
...
- Use enums instead of magic numbers.
- Rework algorithm to use the bytes size from the target to determine when to
emit stack protectors.
- Get rid of "propolice" in any comments.
- Renamed an option to its expanded form.
- Other miscellanenous changes.
More changes will come after this.
llvm-svn: 58723
2008-11-04 21:53:09 +00:00
Gabor Greif
e5f9d67a68
fix two validation errors
...
llvm-svn: 58722
2008-11-04 21:50:59 +00:00
Gabor Greif
6b7bb1f127
fix typos, harmonize formatting
...
llvm-svn: 58721
2008-11-04 21:48:10 +00:00