Commit Graph

72029 Commits

Author SHA1 Message Date
Rafael Espindola b6444c0401 Small cleanups.
llvm-svn: 131120
2011-05-10 03:26:21 +00:00
Rafael Espindola b6089d6cac Factor some code into a new EmitFrames method.
llvm-svn: 131119
2011-05-10 03:14:15 +00:00
Rafael Espindola 0e130d1d37 Remove unused argument.
llvm-svn: 131118
2011-05-10 03:01:39 +00:00
Rafael Espindola 74b101f3e3 Parsing and plumbing for .cfi_sections.
llvm-svn: 131117
2011-05-10 01:10:18 +00:00
Devang Patel 3fd06f760b Preserve line number information.
llvm-svn: 131112
2011-05-10 00:03:11 +00:00
Devang Patel 589845d887 Do not ignore InlinedAt while walking up scope chain to find subprogram node.
llvm-svn: 131106
2011-05-09 22:14:49 +00:00
Jim Grosbach 112a2de78c Tidy up. 80-column and whitespace.
llvm-svn: 131094
2011-05-09 20:05:25 +00:00
Eric Christopher 4480428474 Look through struct wrapped types for inline asm statments.
Patch by Evan Cheng.

llvm-svn: 131093
2011-05-09 20:04:43 +00:00
Dan Gohman 0daf687e1d Change a few std::maps to DenseMaps.
llvm-svn: 131088
2011-05-09 18:44:09 +00:00
Eric Christopher 5dc19f916c Fix td file comments for Mips.
Patch by Liu <proljc@gmail.com>!

llvm-svn: 131086
2011-05-09 18:16:46 +00:00
Mon P Wang 92ff16b7bb Fixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for size 32
llvm-svn: 131085
2011-05-09 17:47:27 +00:00
Duncan Sands 6be291a2cd Indent properly, no functionality change.
llvm-svn: 131082
2011-05-09 08:03:33 +00:00
NAKAMURA Takumi 392445823d Eliminate an unused line to fix a warning.
llvm-svn: 131078
2011-05-08 23:19:04 +00:00
Jakob Stoklund Olesen 89bd2ae517 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 d724a590e5 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 ab39c63538 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 aa2637343c 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 c132174169 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 c8c4ded3c6 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 6dec2aa9b4 Fix comments per Duncan's review.
llvm-svn: 131055
2011-05-07 19:23:14 +00:00
Duncan Sands af32728a57 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 1e3db02bda 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 58799a35e5 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 bcabcdcedd Switch Darwin to the generic CIE/FDE printer.
llvm-svn: 131031
2011-05-06 22:29:04 +00:00
Dylan Noblesmith 4c261a2831 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 00dd3d6001 ExecutionEngine: add missing file
From revision 131025.

llvm-svn: 131029
2011-05-06 22:20:09 +00:00
Akira Hatanaka cbb7fa68ed 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 8c0487006e 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 ab6bd20da9 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 fed7f0b3a0 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 a5c889982a 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 2e116a4491 Added an assertion, and updated a comment.
llvm-svn: 131022
2011-05-06 21:52:52 +00:00
Nick Lewycky 64c9284411 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 d26fc5e013 80 col violations.
llvm-svn: 131015
2011-05-06 20:52:23 +00:00
Eli Friedman 2518f8376d 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 7a78f66145 Use array_lengthof. No functional change.
llvm-svn: 131008
2011-05-06 19:50:10 +00:00
Jakob Stoklund Olesen 57c8f58aeb 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 59ddb73d47 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 763ac0397e ParseFile() may throw, so extend the try/catch to handle that.
llvm-svn: 131004
2011-05-06 18:39:28 +00:00
Galina Kistanova a335f5aeeb Move few target-dependant tests to appropriate directories.
llvm-svn: 131002
2011-05-06 18:24:46 +00:00
Andrew Trick 84f9ad9bf2 Typo: Reviewed by Alistair.
llvm-svn: 131001
2011-05-06 18:14:32 +00:00
Rafael Espindola 20ce0c0ce0 Pass -disable-cfi to llc.
llvm-svn: 130999
2011-05-06 18:01:58 +00:00
Jakob Stoklund Olesen f8da028895 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 c86fe05923 Use TargetMachine hooks to properly print debug variable locations.
llvm-svn: 130997
2011-05-06 17:59:59 +00:00
Jakob Stoklund Olesen 6cc4e4ddd0 Also count identity copies.
llvm-svn: 130996
2011-05-06 17:59:57 +00:00
Rafael Espindola ac893d6898 Pass -disable-cfi.
llvm-svn: 130995
2011-05-06 17:44:58 +00:00
Andrew Trick aab77fe574 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 17b532728b 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 705d25a1f4 Nothing else uses this label.
llvm-svn: 130989
2011-05-06 15:44:29 +00:00
Rafael Espindola 6e4fa20efb Yet more dead code.
llvm-svn: 130988
2011-05-06 15:31:55 +00:00