Chris Lattner
82ce325f16
reapply: Use the new TB_NOT_REVERSABLE flag instead of special
...
reapply: reimplement the second half of the or/add optimization. We should now
with no changes. Turns out that one missing "Defs = [EFLAGS]" can upset things
a bit.
llvm-svn: 116040
2010-10-08 03:57:25 +00:00
Chris Lattner
fbdd285dd6
reapply the patch reverted in r116033:
...
"Reimplement (part of) the or -> add optimization. Matching 'or' into 'add'"
With a critical fix: the add pseudos clobber EFLAGS.
llvm-svn: 116039
2010-10-08 03:54:52 +00:00
Michael J. Spencer
3725cf3d21
Fix Formatting.
...
llvm-svn: 116038
2010-10-08 03:17:21 +00:00
Michael J. Spencer
bdf3b8770f
MC-COFF: Fix Simple and Complex type. Fixes PR8320.
...
llvm-svn: 116037
2010-10-08 03:17:11 +00:00
Michael J. Spencer
fc3f9d7c92
Fix Whitespace.
...
llvm-svn: 116036
2010-10-08 03:16:56 +00:00
Daniel Dunbar
8b2890afae
Update CMake.
...
llvm-svn: 116034
2010-10-08 02:30:03 +00:00
Daniel Dunbar
d3b6b8bf2b
Revert "Reimplement (part of) the or -> add optimization. Matching 'or' into
...
'add'", which seems to have broken just about everything.
llvm-svn: 116033
2010-10-08 02:07:32 +00:00
Daniel Dunbar
59848f6703
Revert "Use the new TB_NOT_REVERSABLE flag instead of special ", which depends
...
on r116007, which I am about to revert.
llvm-svn: 116032
2010-10-08 02:07:29 +00:00
Daniel Dunbar
983fae5a86
Revert "reimplement the second half of the or/add optimization. We should now",
...
which depends on r116007, which I am about to revert.
llvm-svn: 116031
2010-10-08 02:07:26 +00:00
Daniel Dunbar
8ac0e27ca6
Fix -Asserts warning.
...
llvm-svn: 116030
2010-10-08 02:07:22 +00:00
Eric Christopher
45a5ff5ca3
Move to thumb2 loads, fixes a problem with incoming registers
...
as thumb1.
Fixes lencod.
llvm-svn: 116027
2010-10-08 01:13:17 +00:00
Chris Lattner
7577cb7b49
reimplement the second half of the or/add optimization. We should now
...
only end up emitting LEA instead of OR. If we aren't able to promote
something into an LEA, we should never be emitting it as an ADD.
Add some testcases that we emit "or" in cases where we used to produce
an "add".
llvm-svn: 116026
2010-10-08 01:05:10 +00:00
Jim Grosbach
edbbf33203
Add test file for simple ARM binary encodings with MC
...
llvm-svn: 116024
2010-10-08 00:47:59 +00:00
Jim Grosbach
1214818a3e
Enable binary encoding of some simple instructions.
...
llvm-svn: 116022
2010-10-08 00:39:21 +00:00
Eric Christopher
4d10241635
Try to fix ocaml bindings.
...
llvm-svn: 116021
2010-10-08 00:36:21 +00:00
Jim Grosbach
df2ff926a6
Make <target>CodeEmitter::getBinaryCodeForInstr() a const method.
...
llvm-svn: 116018
2010-10-08 00:21:28 +00:00
Chris Lattner
d62e94b465
Use the new TB_NOT_REVERSABLE flag instead of special
...
casing FsMOVAPDrr/FsMOVAPSrr.
llvm-svn: 116016
2010-10-08 00:03:02 +00:00
Michael J. Spencer
452789b5c0
MC-COFF: Add test for my last commit.
...
llvm-svn: 116015
2010-10-08 00:00:28 +00:00
Chris Lattner
72e7e84c3f
simplify some map operations.
...
llvm-svn: 116014
2010-10-07 23:57:02 +00:00
Michael J. Spencer
43ccdd557d
MC-COFF: Handle relaxation in COFF better. Fixes PR8321.
...
llvm-svn: 116013
2010-10-07 23:55:40 +00:00
Dan Gohman
27e145fc97
Delete the FormulaSorter class and inline its one method into its
...
one user. This code will be restructured soon and FormulaSorter
is getting in the way.
llvm-svn: 116012
2010-10-07 23:52:18 +00:00
Dan Gohman
9b55022e83
Fix a spello.
...
llvm-svn: 116011
2010-10-07 23:43:09 +00:00
Dan Gohman
d8eb76e4e8
Charge a formula for explicit multiplies on scaled registers too,
...
not just base registers.
llvm-svn: 116010
2010-10-07 23:41:58 +00:00
Dan Gohman
aa2c086eb9
Use size_t for consistency.
...
llvm-svn: 116009
2010-10-07 23:37:58 +00:00
Dan Gohman
8cc92ffff1
When merging one use into another, transfer the offsets from
...
the old use to the new one.
llvm-svn: 116008
2010-10-07 23:36:45 +00:00
Chris Lattner
d8f05bf65e
Reimplement (part of) the or -> add optimization. Matching 'or' into 'add'
...
is general goodness because it allows ORs to be converted to LEA to avoid
inserting copies. However, this is bad because it makes the generated .s
file less obvious and gives valgrind heartburn (tons of false positives in
bitfield code).
While the general fix should be in valgrind, we can at least try to avoid
emitting ADD instructions that *don't* get promoted to LEA. This is more
work because it requires introducing pseudo instructions to represents
"add that knows the bits are disjoint", but hey, people really love valgrind.
This fixes this testcase:
https://bugs.kde.org/show_bug.cgi?id=242137#c20
the add r/i cases are coming next.
llvm-svn: 116007
2010-10-07 23:36:18 +00:00
Jakob Stoklund Olesen
1d81101e97
After splitting, the remaining LiveInterval may be fragmented into multiple
...
connected components. These components should be allocated different virtual
registers because there is no reason for them to be allocated together.
Add the ConnectedVNInfoEqClasses class to calculate the connected components,
and move values to new LiveIntervals.
Use it from SplitKit::rewrite by creating new virtual registers for the
components.
llvm-svn: 116006
2010-10-07 23:34:34 +00:00
Dan Gohman
b8c38d92e4
Fix LSR to keep the RegUseTracker up to date when combining users.
...
This doesn't usually matter, because the other heuristics usually
succeed regardless, but it's good to keep the register use
bookkeeping consistent.
llvm-svn: 116005
2010-10-07 23:33:43 +00:00
Devang Patel
35201e0fd6
Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.
...
llvm-svn: 116004
2010-10-07 23:29:37 +00:00
John Thompson
87f1278fd9
Unbreak cmake build.
...
llvm-svn: 116003
2010-10-07 23:12:15 +00:00
Evan Cheng
7fa1e3a474
Code refactoring.
...
llvm-svn: 116002
2010-10-07 23:12:15 +00:00
Chris Lattner
2212441ff7
Reduce casting in various tables by defining the table
...
with the right types.
llvm-svn: 116001
2010-10-07 23:08:41 +00:00
Nick Lewycky
564c2d6894
Warn about broken GCCs on ARM due to the problem fixed:
...
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01070.html
llvm-svn: 115998
2010-10-07 22:30:47 +00:00
Chris Lattner
17850b2677
simplify code: don't build up vector only to assert it is empty.
...
llvm-svn: 115997
2010-10-07 22:26:19 +00:00
Owen Anderson
69cbf2e8b7
Now with fewer extraneous semicolons!
...
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Jim Grosbach
504d7b7d8b
Move checking for t2MOVCCi16 to the right place.
...
llvm-svn: 115994
2010-10-07 22:14:01 +00:00
Jim Grosbach
e949170bad
Trivial MC code emitter shell. No instruction forms actually handled yet.
...
llvm-svn: 115993
2010-10-07 22:12:50 +00:00
Evan Cheng
6ff4de5199
Correctly check if a path is a directory. Fix by Brian Korver.
...
llvm-svn: 115991
2010-10-07 22:05:57 +00:00
Devang Patel
ee23e6ea23
Provie a clearner interface so that FE can decide whether a function has prototype or not.
...
llvm-svn: 115988
2010-10-07 22:03:01 +00:00
Jim Grosbach
ec0a25f2b1
Include the auto-generated bits for machine encoding.
...
llvm-svn: 115987
2010-10-07 21:57:55 +00:00
Nick Lewycky
2d8ea609e1
Fix typo in comment.
...
llvm-svn: 115986
2010-10-07 21:55:16 +00:00
Eric Christopher
183b18d430
Remember to promote load/store types for stack to register size.
...
llvm-svn: 115984
2010-10-07 21:40:18 +00:00
Chris Lattner
16aa36001d
convert test to use the existing classes that the multipatterns
...
use. Since TEST is completely different than all other binops,
don't define a multipattern for it.
This completes factorization of binops.
llvm-svn: 115982
2010-10-07 21:31:03 +00:00
Chris Lattner
bd89233607
convert cmp to use a multipattern
...
llvm-svn: 115978
2010-10-07 20:56:25 +00:00
Evan Cheng
7c89d70f27
Canonicalize X86ISD::MOVDDUP nodes to v2f64 to make sure all cases match. Also eliminate unneeded isel patterns. rdar://8520311
...
llvm-svn: 115977
2010-10-07 20:50:20 +00:00
Dan Gohman
b41a554403
This file needs ToolOutputFile.h too.
...
llvm-svn: 115976
2010-10-07 20:48:46 +00:00
Jim Grosbach
671713cc62
ARM instruction don't have instruction prefixes, so remove the helper functions
...
for them from the MCCodeEmitter.
llvm-svn: 115975
2010-10-07 20:41:30 +00:00
Jim Grosbach
ea4028ac17
Add output stream operator for MCInst.
...
llvm-svn: 115974
2010-10-07 20:38:37 +00:00
Dan Gohman
6645ce3f75
Move tool_output_file into its own file.
...
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
Owen Anderson
d07798cef0
Add initialization routines for Instrumentation.
...
llvm-svn: 115971
2010-10-07 20:17:24 +00:00