Duncan Sands
afe16d8de1
Indent properly, no functionality change.
...
llvm-svn: 131082
2011-05-09 08:03:33 +00:00
NAKAMURA Takumi
b8bfce2165
Eliminate an unused line to fix a warning.
...
llvm-svn: 131078
2011-05-08 23:19:04 +00:00
Jakob Stoklund Olesen
56a5573e6f
Remove an assertion to fix PR9872.
...
It can happen that a live debug variable is the last use of a sub-register, and
the register allocator will pick a larger register class for the virtual
register. If the allocated register doesn't support the sub-register index,
just use %noreg for the debug variables instead of asserting.
In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD
register. The register is split and one part is inflated to GR32 and assigned
%ESI because there are no more normal uses of sub_8bit_hi.
Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will
simply insert a %noreg instead, and the debug variable will be marked
unavailable in that range.
We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I
don't know if DWARF even supports that.
llvm-svn: 131073
2011-05-08 19:21:08 +00:00
Benjamin Kramer
ba7c9948e8
X86: Add a bunch of peeps for add and sub of SETB.
...
"b + ((a < b) ? 1 : 0)" compiles into
cmpl %esi, %edi
adcl $0, %esi
instead of
cmpl %esi, %edi
sbbl %eax, %eax
andl $1, %eax
addl %esi, %eax
This saves a register, a false dependency on %eax
(Intel's CPUs still don't ignore it) and it's shorter.
llvm-svn: 131070
2011-05-08 18:36:07 +00:00
Rafael Espindola
0baeced1f4
Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
...
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.
llvm-svn: 131067
2011-05-08 14:35:21 +00:00
Eli Friedman
f580be6fe3
PR9869: Add explicit destructor declarations to Operator subclasses, to allow
...
compiling Operator.h with gcc 4.6 in C++0x mode.
llvm-svn: 131062
2011-05-08 01:59:22 +00:00
Jakob Stoklund Olesen
4a57c64408
Eliminate the ARM sub-register indexes that are not needed by the sources.
...
Tablegen will invent its own names for these indexes, and the register file is a
bit simpler.
llvm-svn: 131059
2011-05-07 21:22:42 +00:00
Jakob Stoklund Olesen
3bc1816380
Teach TableGen to automatically generate missing SubRegIndex instances.
...
The RegisterInfo.td file should only specify the indexes that sources need to
refer to. The rest is inferred.
llvm-svn: 131058
2011-05-07 21:22:39 +00:00
Eli Friedman
f608aeaefa
Fix comments per Duncan's review.
...
llvm-svn: 131055
2011-05-07 19:23:14 +00:00
Duncan Sands
77695f14dc
The comparision "max(x,y)==x" is equivalent to "x>=y". Since the max is
...
often expressed as "x >= y ? x : y", there is a good chance we can extract
the existing "x >= y" from it and use that as a replacement for "max(x,y)==x".
llvm-svn: 131049
2011-05-07 16:56:49 +00:00
Eric Christopher
47f9c0695c
Fix the non-MC encoding of pkhbt and pkhtb.
...
Patch by Stephen Hines.
llvm-svn: 131045
2011-05-07 04:37:27 +00:00
Jakob Stoklund Olesen
0c88537b3d
Revert ExecutionEngine patches, they either failed to build or broke unit tests.
...
Please ensure the build is clean and tests are passing when recommitting.
llvm-svn: 131044
2011-05-07 03:12:54 +00:00
Rafael Espindola
003a45810d
Switch Darwin to the generic CIE/FDE printer.
...
llvm-svn: 131031
2011-05-06 22:29:04 +00:00
Dylan Noblesmith
2cfbf76aa1
ExecutionEngine: delete duplicated files
...
Forgot to `svn rm` these in revisions 131025 / 131029.
llvm-svn: 131030
2011-05-06 22:24:04 +00:00
Dylan Noblesmith
93071813a2
ExecutionEngine: add missing file
...
From revision 131025.
llvm-svn: 131029
2011-05-06 22:20:09 +00:00
Akira Hatanaka
fe1f642eb1
1. Keep lines in 80 columns.
...
2. Remove unused function.
3. Correct indentation.
llvm-svn: 131028
2011-05-06 22:11:29 +00:00
Dylan Noblesmith
1560f431cc
ExecutionEngine: move createJIT() definition
...
As an ExecutionEngine class function, its definition
really belongs in ExecutionEngine.cpp, not JIT.cpp.
llvm-svn: 131027
2011-05-06 22:07:14 +00:00
Dylan Noblesmith
a12e687660
ExecutionEngine: push TargetMachine creation into clients
...
In particular, into EngineBuilder. This should only impact
the private API between the EE and EB classes, not external
clients, since JITCtor and MCJITCtor are both protected members.
llvm-svn: 131026
2011-05-06 22:06:22 +00:00
Dylan Noblesmith
763e1abfba
ExecutionEngine: fix JIT/MCJIT selectTarget() duplication
...
This prepares for making JITCtor/MCJITCtor take a
TargetMachine* directly from clients like EngineBuilder.
llvm-svn: 131025
2011-05-06 22:05:43 +00:00
Jakob Stoklund Olesen
bb09bbccb8
Emit a proper error message when register allocators run out of registers.
...
This can't be just an assertion, users can always write impossible inline
assembly. Such an assembly statement should be included in the error message.
llvm-svn: 131024
2011-05-06 21:58:30 +00:00
Andrew Trick
cb5a80566c
Added an assertion, and updated a comment.
...
llvm-svn: 131022
2011-05-06 21:52:52 +00:00
Nick Lewycky
5678c8dcc2
It's valid to take the blockaddress of a different function, so remove this
...
assert in the bitcode writer. No change needed because the ValueEnumerator holds
a whole-module numbering anyhow. Fixes PR9857!
llvm-svn: 131016
2011-05-06 21:09:44 +00:00
Evan Cheng
3cda8bc78e
80 col violations.
...
llvm-svn: 131015
2011-05-06 20:52:23 +00:00
Eli Friedman
12e590e760
Make the logic for determining function alignment more explicit. No functionality change.
...
llvm-svn: 131012
2011-05-06 20:34:06 +00:00
Eli Friedman
219b955495
Use array_lengthof. No functional change.
...
llvm-svn: 131008
2011-05-06 19:50:10 +00:00
Jakob Stoklund Olesen
d7896b41a3
Iterate backwards over debug locations when splitting them so they can be safely erased.
...
This should unbreak dragonegg-i386-linux and build-self-4-mingw32.
llvm-svn: 131007
2011-05-06 19:31:19 +00:00
Jim Grosbach
780c27bb61
Improve diagnostics for some parse errors. Not asserting when a user input
...
error is detected is a good thing.
llvm-svn: 131005
2011-05-06 18:47:45 +00:00
Jim Grosbach
f1f78457f3
ParseFile() may throw, so extend the try/catch to handle that.
...
llvm-svn: 131004
2011-05-06 18:39:28 +00:00
Galina Kistanova
7371b0a61e
Move few target-dependant tests to appropriate directories.
...
llvm-svn: 131002
2011-05-06 18:24:46 +00:00
Andrew Trick
7e699489f1
Typo: Reviewed by Alistair.
...
llvm-svn: 131001
2011-05-06 18:14:32 +00:00
Rafael Espindola
b098ac2b95
Pass -disable-cfi to llc.
...
llvm-svn: 130999
2011-05-06 18:01:58 +00:00
Jakob Stoklund Olesen
6e6ed39f02
Update LiveDebugVariables after live range splitting.
...
After a virtual register is split, update any debug user variables that resided
in the old register. This ensures that the LiveDebugVariables are still correct
after register allocation.
This may create DBG_VALUE instructions that place a user variable in a register
in parts of the function and in a stack slot in other parts. DwarfDebug
currently doesn't support that.
llvm-svn: 130998
2011-05-06 18:00:02 +00:00
Jakob Stoklund Olesen
27f4581ec6
Use TargetMachine hooks to properly print debug variable locations.
...
llvm-svn: 130997
2011-05-06 17:59:59 +00:00
Jakob Stoklund Olesen
04122feb16
Also count identity copies.
...
llvm-svn: 130996
2011-05-06 17:59:57 +00:00
Rafael Espindola
2534f45206
Pass -disable-cfi.
...
llvm-svn: 130995
2011-05-06 17:44:58 +00:00
Andrew Trick
6e2ccb7b00
Post-RA scheduler compile time fix. Quadratic computation of DAG node depth.
...
The post-ra scheduler was explicitly updating the depth of a node's
successors after scheduling it, regardless of whether the successor
was ready. This is quadratic for DAGs with transitively redundant
edges. I simply removed the useless update of depth, which is lazilly
computed later.
Fixes <rdar://problem/9044332> compiler takes way too long to build TextInput.
llvm-svn: 130992
2011-05-06 17:09:08 +00:00
Devang Patel
188fd17fe4
Move CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebug.cpp to DwarfCompileUnit.cpp
...
llvm-svn: 130991
2011-05-06 16:57:54 +00:00
Rafael Espindola
a4de174c00
Nothing else uses this label.
...
llvm-svn: 130989
2011-05-06 15:44:29 +00:00
Rafael Espindola
ef239d2fdc
Yet more dead code.
...
llvm-svn: 130988
2011-05-06 15:31:55 +00:00
Rafael Espindola
4228ece8fd
Update comments.
...
llvm-svn: 130987
2011-05-06 15:28:56 +00:00
Rafael Espindola
9b57a8739e
More dead code elimination.
...
llvm-svn: 130985
2011-05-06 15:22:26 +00:00
Rafael Espindola
59462d8ae3
Dead code elimination.
...
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Justin Holewinski
e4a7007565
PTX: add PTX 2.3 language target
...
Patch by Wei-Ren Chen
llvm-svn: 130980
2011-05-06 11:40:36 +00:00
Duncan Sands
c4d27a63a4
Fix PR9820: a read-only call differs from a load in that a load doesn't
...
return the pointer being dereferenced, it returns the pointee, but a call
might return the pointer itself.
llvm-svn: 130979
2011-05-06 10:30:37 +00:00
Eli Friedman
f7b4d848ae
Re-revert r130877; it's apparently causing a regression on 197.parser,
...
possibly related to cbnz formation.
llvm-svn: 130977
2011-05-06 05:23:07 +00:00
Nick Lewycky
eef7bead41
The computation of string length is not that complicated. Fix it, again. :)
...
llvm-svn: 130967
2011-05-05 23:52:18 +00:00
Rafael Espindola
37aa9169a8
Remove DwarfTableException.
...
llvm-svn: 130964
2011-05-05 23:19:54 +00:00
Rafael Espindola
f109f01ec2
Remove the DwarfTable enum.
...
llvm-svn: 130959
2011-05-05 22:14:31 +00:00
Devang Patel
29780325b3
In debug output, clearly list new instructions without DebugLoc.
...
llvm-svn: 130957
2011-05-05 22:05:57 +00:00
Devang Patel
99147805e4
Remove little used statistical counter.
...
llvm-svn: 130955
2011-05-05 22:00:08 +00:00