Commit Graph

72094 Commits

Author SHA1 Message Date
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
Rafael Espindola d06c2c1b81 Update comments.
llvm-svn: 130987
2011-05-06 15:28:56 +00:00
Rafael Espindola 4bfa978ca5 More dead code elimination.
llvm-svn: 130985
2011-05-06 15:22:26 +00:00
Rafael Espindola a716096677 Dead code elimination.
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Justin Holewinski 11d70b6b32 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 a071c82900 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 5401962643 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 a7028848a1 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 bb237c72a6 Remove DwarfTableException.
llvm-svn: 130964
2011-05-05 23:19:54 +00:00
Rafael Espindola ec0a3a0bbf Remove the DwarfTable enum.
llvm-svn: 130959
2011-05-05 22:14:31 +00:00
Devang Patel 1ff74141bf In debug output, clearly list new instructions without DebugLoc.
llvm-svn: 130957
2011-05-05 22:05:57 +00:00
Devang Patel d6141e1db2 Remove little used statistical counter.
llvm-svn: 130955
2011-05-05 22:00:08 +00:00
Eli Friedman 8a20e66926 PR9838: Fix transform introduced in r127064 to not trigger when only one side of the icmp is an exact shift.
llvm-svn: 130954
2011-05-05 21:59:18 +00:00
Rafael Espindola bc8e3f8c45 Move PPC Linux to CFI.
llvm-svn: 130951
2011-05-05 21:34:33 +00:00
Nick Lewycky d58fe3c55e Fix typo. No functional change.
llvm-svn: 130949
2011-05-05 21:27:14 +00:00
Rafael Espindola 59b6bfdbc6 Implement a really simple DwarfSjLjException.
llvm-svn: 130947
2011-05-05 20:48:31 +00:00
Rafael Espindola 240c96e2ca List all exception types in a switch.
llvm-svn: 130944
2011-05-05 19:48:34 +00:00
Andrew Trick 3dc73aae5e ARM post RA scheduler compile time fix.
BuildSchedGraph was quadratic in the number of calls in the basic
block. After this fix, it keeps only a single call at the top of the
DefList so compile time doesn't blow up on large blocks. This reduces
postRA sched time on an external test case from 81s to 0.3s.  Although
r130800 (reduced ARM register alias defs) also partially fixes the
issue by reducing the constant overhead of checking call interference
by an order of magnitude.

Fixes <rdar://problem/7662664> very poor compile time with post RA scheduling.

llvm-svn: 130943
2011-05-05 19:32:21 +00:00
Andrew Trick 24b1c48514 whitespace
llvm-svn: 130942
2011-05-05 19:24:06 +00:00
Rafael Espindola a4982bddf3 Don't produce a __debug_frame.
I tested both gdb on a bootstrapped clang and and the gdb testsuite on OS X (snow leopard)
and both are happy using __eh_frame.

llvm-svn: 130937
2011-05-05 18:43:39 +00:00
Galina Kistanova b93a130120 Many LLVM tests relies on standard output stream be in the binary mode. Which is not always the case (on Windows in particular). The patch adds a test to verify that the standard output stream is actually in the binary mode.
llvm-svn: 130936
2011-05-05 18:40:27 +00:00
Owen Anderson 68b6b0efb0 Allow FastISel of three-register-operand instructions.
llvm-svn: 130934
2011-05-05 17:59:04 +00:00
Devang Patel 73bc172493 If debug info for inlined function is missing then handle it gracefully.
llvm-svn: 130933
2011-05-05 17:54:26 +00:00
Eli Friedman f1e2b50a30 PR9848: pandn is not commutative.
No test because I can't think of any way to write one that won't break quickly.

llvm-svn: 130932
2011-05-05 17:45:31 +00:00
Jakob Stoklund Olesen c5a8c08dba Add some statistics to the splitting and spilling frameworks.
llvm-svn: 130931
2011-05-05 17:22:53 +00:00
Eli Friedman 441a01a2b8 Avoid extra vreg copies for arguments passed in registers. Specifically, this can make MachineCSE more effective in some cases (especially in small functions). PR8361 / part of rdar://problem/8259436 .
llvm-svn: 130928
2011-05-05 16:53:34 +00:00
Jakob Stoklund Olesen f118fae233 Fix test to be less sensitive to coalescing.
This should unbreak llvm-gcc-i386-linux-selfhost.

llvm-svn: 130927
2011-05-05 16:48:00 +00:00
Eli Friedman fd8c6adffb Small syntax cleanup; we don't need to #define constants in C++. No functionality change intended.
llvm-svn: 130926
2011-05-05 16:25:23 +00:00
Eli Friedman 2311bdfa7b Minor correction to r130877; fixes PR9846 and hopefully the buildbot failures.
llvm-svn: 130925
2011-05-05 16:18:11 +00:00
Hongbin Zheng cd5afc5feb Minor change: Fix the typo in RegionPass.h and RegionPass.cpp.
llvm-svn: 130920
2011-05-05 13:59:38 +00:00
Bill Wendling a48b1375df Remove a flag that would set the ".eh" symbol as .globl. MachO was the only one
who used this flag, and it now emits CFI and doesn't emit this anymore. All
other targets left this flag "false".
<rdar://problem/8486371>

llvm-svn: 130918
2011-05-05 06:49:15 +00:00
Mikhail Glushenkov fdc5d84ba3 llvmc: Make 'true' and 'false' instances of a 'Bool' class.
llvm-svn: 130915
2011-05-05 04:25:03 +00:00
Mikhail Glushenkov 67ebd94a5d llvmc: Make it possible to provide an argument to (join).
llvm-svn: 130914
2011-05-05 04:24:58 +00:00
Nick Lewycky 4f9c367f0b Update the gcov version used slightly, to make it stop causing modern gcov's to
crash.

llvm-svn: 130911
2011-05-05 02:46:38 +00:00
Nick Lewycky baa878ce4a Remove dead function.
llvm-svn: 130903
2011-05-05 00:17:34 +00:00
Nick Lewycky a3d5d167a8 When the path wasn't emitted by the frontend, discard any path on the source
filename.

llvm-svn: 130897
2011-05-05 00:03:30 +00:00
Jakob Stoklund Olesen 1d3854d583 Disable physical register coalescing by default.
Joining physregs is inherently dangerous because it uses a heuristic to avoid
creating invalid code. Linear scan had an emergency spilling mechanism to deal
with those rare cases. The new greedy allocator does not.

The greedy register allocator is much better at taking hints, so this has almost
no impact on code size and quality. The few cases where it matters show up as
unit tests that now have -join-physregs enabled explicitly.

llvm-svn: 130896
2011-05-04 23:59:00 +00:00
Devang Patel ffb798c1c6 Set debug loc for new instructions.
llvm-svn: 130895
2011-05-04 23:58:50 +00:00
Devang Patel ac794d46bf Set debug location for new PHI nodes created in exit block.
llvm-svn: 130894
2011-05-04 23:58:22 +00:00
Jakob Stoklund Olesen 17d4f9bbcc Prepare remaining tests for -join-physreg going away.
llvm-svn: 130893
2011-05-04 23:54:59 +00:00
Jakob Stoklund Olesen 808dca12f8 Fix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.
It is OK for B to be any GR8_ABCD_H superclass, the returned register class
doesn't have to map surjectively onto B.

llvm-svn: 130892
2011-05-04 23:54:54 +00:00
Jakob Stoklund Olesen 369bddf5ad Fix a batch of x86 tests to be coalescer independent.
Most of these tests require a single mov instruction that can come either before
or after a 2-addr instruction. -join-physregs changes the behavior, but the
results are equivalent.

llvm-svn: 130891
2011-05-04 23:54:51 +00:00
Bill Wendling 260c4a9466 Document the automatic alias printing of InstAliases.
llvm-svn: 130889
2011-05-04 23:40:14 +00:00
Ted Kremenek 37d44bdd92 Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
llvm-svn: 130885
2011-05-04 23:26:59 +00:00
Dan Gohman dd550305e6 Give this test an explicit register allocator, so that it can work even if
the default register allocator is changed.

llvm-svn: 130883
2011-05-04 23:14:02 +00:00
Bill Wendling 2a40131f6b SjLj EH could produce a machine basic block that legitimately has more than one
landing pad as its successor.

SjLj exception handling jumps to the correct landing pad via a switch statement
that's generated right before code-gen. Loosen the constraint in the machine
instruction verifier to allow for this. Note, this isn't the most rigorous check
since we cannot determine where that switch statement came from. But it's
marginally better than turning this check off when SjLj exceptions are used.
<rdar://problem/9187612>

llvm-svn: 130881
2011-05-04 22:54:05 +00:00
Devang Patel 306f8db721 Preserve line number information while threading jumps.
llvm-svn: 130880
2011-05-04 22:48:19 +00:00
Nick Lewycky 892e9934ba Create the parent directories to place the .gcda files in if they don't exist.
That's kinda weird because the .gcno files are supposed to already be there,
but libgcov does this and somehow Google has managed to depend on it.

llvm-svn: 130879
2011-05-04 22:34:29 +00:00
Eli Friedman 0fe4608af2 Re-commit r130862 with a minor change to avoid an iterator running off the edge in some cases.
Original message:

Teach MachineCSE how to do simple cross-block CSE involving physregs.  This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .

llvm-svn: 130877
2011-05-04 22:10:36 +00:00
Devang Patel c7e4fa7c19 Preserve line number info.
llvm-svn: 130876
2011-05-04 21:58:58 +00:00
Galina Kistanova e53ae508ec This test fails on ARM. The test shouldn't explicitly specify alignment (and alignment 4 is wrong) and requires hard-float.
llvm-svn: 130875
2011-05-04 21:57:44 +00:00
Devang Patel 1fb95c996b If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.
llvm-svn: 130874
2011-05-04 21:57:22 +00:00
Devang Patel 0daa07eb90 preserve line number info.
llvm-svn: 130869
2011-05-04 21:37:05 +00:00
Eli Friedman 3bd79ba856 Back out r130862; it appears to be breaking bootstrap.
llvm-svn: 130867
2011-05-04 20:48:42 +00:00
Eli Friedman a16fc2fec0 Teach MachineCSE how to do simple cross-block CSE involving physregs. This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .
llvm-svn: 130862
2011-05-04 19:54:24 +00:00
Duncan Sands 9aa54fef84 Remove an unused variable.
llvm-svn: 130860
2011-05-04 19:13:01 +00:00
Jakob Stoklund Olesen 28a93a49bb Fix more register and coalescing dependencies.
llvm-svn: 130859
2011-05-04 19:02:11 +00:00
Jakob Stoklund Olesen d7fd7bfc31 Explicitly request physreg coalesing for a bunch of Thumb2 unit tests.
These tests all follow the same pattern:

	mov	r2, r0
	movs	r0, #0
	$CMP	r2, r1
	it	eq
	moveq	r0, #1
	bx	lr

The first 'mov' can be eliminated by rematerializing 'movs r0, #0' below the
test instruction:

	$CMP	r0, r1
	mov.w	r0, #0
	it	eq
	moveq	r0, #1
	bx	lr

So far, only physreg coalescing can do that. The register allocators won't yet
split live ranges just to eliminate copies. They can learn, but this particular
problem is not likely to show up in real code. It only appears because r0 is
used for both the function argument and return value.

llvm-svn: 130858
2011-05-04 19:02:07 +00:00
Jakob Stoklund Olesen 093a94cdae Implement SystemZRegisterInfo::getMatchingSuperRegClass to enable cross-class joins.
llvm-svn: 130857
2011-05-04 19:02:04 +00:00
Jakob Stoklund Olesen e7528c45ea FileCheckize and break dependence on coalescing order.
llvm-svn: 130856
2011-05-04 19:02:01 +00:00
Jakob Stoklund Olesen 067ba3c23c Explicitly request -join-physregs for some tests that depend on it.
llvm-svn: 130855
2011-05-04 19:01:59 +00:00
Devang Patel 39ecf816c5 Do not emit location expression size twice.
llvm-svn: 130854
2011-05-04 19:00:57 +00:00
Rafael Espindola 2998e6ce46 Fix cmake build.
llvm-svn: 130850
2011-05-04 18:46:56 +00:00
Akira Hatanaka 3bace5d223 Remove LLVM IR metadata in test case committed in r130847.
llvm-svn: 130849
2011-05-04 18:28:36 +00:00
Akira Hatanaka 23e8ecf125 Prevent instructions using $gp from being placed between a jalr and the instruction that restores the clobbered $gp.
llvm-svn: 130847
2011-05-04 17:54:27 +00:00
Rafael Espindola a75589171a Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
it is both inefficient and unexpected by dwarfdump. Change to
a DW_FORM_data4.

While in here, change the predicate name to reflect that the position
is not really absolute (it is an offset), just that the linker needs a
relocation.

llvm-svn: 130846
2011-05-04 17:44:06 +00:00
Jakob Stoklund Olesen f71fe4333b Rename -disable-physical-join to -join-physregs and invert it.
Physreg joining is still on by default, but I will turn it off shortly.

llvm-svn: 130844
2011-05-04 16:45:05 +00:00
Devang Patel c981f6299e Tighten up check for empty (i.e. no meaningful debug info) module. This fixes dwarf-die2.c test case from gcc test suite.
llvm-svn: 130842
2011-05-04 16:34:02 +00:00
Duncan Sands a228785526 Add variations on: max(x,y) >= min(x,z) folds to true. This isn't that common,
but according to my super-optimizer there are only two missed simplifications
of -instsimplify kind when compiling bzip2, and this is one of them.  It amuses
me to have bzip2 be perfectly optimized as far as instsimplify goes!

llvm-svn: 130840
2011-05-04 16:05:05 +00:00
Nick Lewycky 6d9f061a6b Emit gcov data files to the directory specified in the metadata produced by the
frontend, if applicable.

llvm-svn: 130835
2011-05-04 04:03:04 +00:00
Nick Lewycky 0e5667bc89 Fix crash when not setting GCOV_PREFIX.
llvm-svn: 130834
2011-05-04 03:58:45 +00:00
Bill Wendling 3d57441e56 Remove dead intrinsics.
llvm-svn: 130831
2011-05-04 02:40:54 +00:00
Andrew Trick 1abe296cfd indvars: Added DisableIVRewrite and WidenIVs.
This adds functionality to remove size/zero extension during indvars
without generating a canonical IV and rewriting all IV users. It's
disabled by default so should have no effect on codegen. Work in progress.

llvm-svn: 130829
2011-05-04 02:10:13 +00:00
Nick Lewycky 737aac5107 The system suppression file should catch these, but since they *once again* are
not, I'll just add them here and be done with it.

llvm-svn: 130819
2011-05-04 01:03:02 +00:00
Jakob Stoklund Olesen f1b401800a Don't depend on the physreg coalescing order.
llvm-svn: 130818
2011-05-04 01:01:47 +00:00
Jakob Stoklund Olesen 5b5abb4ea1 Don't run this test through -regalloc=basic.
The basic allocator is really bad about hinting, so it doesn't eliminate all
copies when physreg joining is disabled.

llvm-svn: 130817
2011-05-04 01:01:44 +00:00
Jakob Stoklund Olesen d3b2f44c9d Fix register-dependent XCore tests
llvm-svn: 130816
2011-05-04 01:01:41 +00:00
Jakob Stoklund Olesen 7f7fc82141 Fix register-dependent test in MSP430.
llvm-svn: 130815
2011-05-04 01:01:39 +00:00
Jakob Stoklund Olesen 839beb4124 Implement MSP430RegisterInfo::getMatchingSuperRegClass to enable cross-class
coalescing.

llvm-svn: 130814
2011-05-04 01:01:36 +00:00
Eric Christopher 438dc7e1a7 Remove some random comments that snuck in from somewhere.
llvm-svn: 130812
2011-05-04 00:48:02 +00:00
Jakob Stoklund Olesen f8be385c9b Mark ultra-super-registers QQQQ as call-clobbered instead of the D sub-registers.
LiveVariables doesn't understand that clobbering D0 and D1 completely overwrites
Q0, so if Q0 is live-in to a function, its live range will extend beyond a
function call that only clobbers D0 and D1. This shows up in the
ARM/2009-11-01-NeonMoves test case.

LiveVariables should probably implement the much stricter rules for physreg
liveness that RAFast imposes - a physreg is killed by the first use of any
alias.

llvm-svn: 130801
2011-05-03 22:31:24 +00:00
Jakob Stoklund Olesen 51b35f7bb1 Fix a bunch of ARM tests to be register allocation independent.
llvm-svn: 130800
2011-05-03 22:31:21 +00:00
Andrew Trick 38c4e34abb indvars: Added canExpandBackEdgeTakenCount.
Only create a canonical IV for backedge taken count if it will
actually be used by LinearFunctionTestReplace. And some related
cleanup, preparing to reduce dependence on canonical IVs.
No significant effect on x86 or arm in the test-suite.

llvm-svn: 130799
2011-05-03 22:24:10 +00:00
Devang Patel 543596d57b Even if the subprogram is going to use AT_specification, emit DW_AT_MIPS_linkage_name. This helps gdb and fixes var-path-expr.exp regression reported by gdb testsuite.
llvm-svn: 130794
2011-05-03 21:50:34 +00:00
Daniel Dunbar f6daf94ab2 MCDwarf: Don't save Twine to local variable, this is almost never safe to do
(and should thus never be done).
 - Should fix a crash on win32.

llvm-svn: 130793
2011-05-03 21:33:37 +00:00
Bill Wendling db0996c822 Replace the "movnt" intrinsics with a native store + nontemporal metadata bit.
<rdar://problem/8460511>

llvm-svn: 130791
2011-05-03 21:11:17 +00:00
Jakob Stoklund Olesen eaa6ed1ad8 Gracefully handle invalid live ranges. Fix PR9831.
Register coalescing can sometimes create live ranges that end in the middle of a
basic block without any killing instruction. When SplitKit detects this, it will
repair the live range by shrinking it to its uses.

Live range splitting also needs to know about this. When the range shrinks so
much that it becomes allocatable, live range splitting fails because it can't
find a good split point. It is paranoid about making progress, so an allocatable
range is considered an error.

The coalescer should really not be creating these bad live ranges. They appear
when coalescing dead copies.

llvm-svn: 130787
2011-05-03 20:42:13 +00:00
Duncan Sands 0a9c1246d7 Implement some basic simplifications involving min/max, for example
max(a,b) >= a -> true.  According to my super-optimizer, these are
by far the most common simplifications (of the -instsimplify kind)
that occur in the testsuite and aren't caught by -std-compile-opts.

llvm-svn: 130780
2011-05-03 19:53:10 +00:00
Jim Grosbach e6ce2053e7 Tidy up. Add missing newline to generated file.
llvm-svn: 130779
2011-05-03 19:09:56 +00:00
Evan Cheng 93b5cdc5ab Make the test less likely to fail with minor changes.
llvm-svn: 130778
2011-05-03 19:09:32 +00:00
Akira Hatanaka 22fc723818 Fix function MipsRegisterInfo::getRegisterNumbering.
llvm-svn: 130774
2011-05-03 18:41:54 +00:00
Bob Wilson c5242b0e78 Remove test for iOS divmod function, since that is disabled for now.
llvm-svn: 130769
2011-05-03 17:54:49 +00:00
Bob Wilson 09585e1c5d Temporarily disable use of divmod compiler-rt functions for iOS.
llvm-svn: 130766
2011-05-03 17:33:22 +00:00
Bruno Cardoso Lopes 86c6e7057d Fold ARM coprocessor intrinsics patterns into the instructions defs whenever
it's possible.

llvm-svn: 130764
2011-05-03 17:29:29 +00:00
Bruno Cardoso Lopes 168c9005b5 Add a few ARM coprocessor intrinsics. Testcases included
llvm-svn: 130763
2011-05-03 17:29:22 +00:00
Bob Wilson 600c8a2391 Fix a comment.
llvm-svn: 130761
2011-05-03 17:22:56 +00:00
Devang Patel e02e58528a If the front end has emitted llvm.dbg.cu and other debug info anchors (clang does it now) then use them directly. This saves one scan of entire module, to collect debug info, which in turns saves few machine cycles at compile time.
llvm-svn: 130759
2011-05-03 16:45:22 +00:00
Devang Patel 09fa69e151 Use llvm.dbg.cu named metadata to collect compile units.
llvm-svn: 130756
2011-05-03 16:18:28 +00:00
Benjamin Kramer 9c373c1c7a Remove unused variables caught by GCC's -Wunused-but-set-variable.
llvm-svn: 130755
2011-05-03 16:00:27 +00:00
Rafael Espindola a51ef94ec1 Pass --disable-cfi to llc.
llvm-svn: 130754
2011-05-03 15:56:16 +00:00
Michael J. Spencer 9973738b65 Add pentium{3,4}m cpus. Patch by Alexander Best!
llvm-svn: 130749
2011-05-03 03:42:50 +00:00
Eric Christopher d2aa241378 xmm0 is an implicit parameter in this and so shouldn't be in the
string template.

Fixes rdar://8493866

llvm-svn: 130747
2011-05-03 01:28:32 +00:00
Dan Gohman 6136e94897 Add an unfolded offset field to LSR's Formula record. This is used to
model constants which can be added to base registers via add-immediate
instructions which don't require an additional register to materialize
the immediate.

llvm-svn: 130743
2011-05-03 00:46:49 +00:00
Owen Anderson 66fd073974 Other parts of the SelectionDAG framework assume that targets use their pointer type for vector indices. Make the vector unrolling code respect that.
llvm-svn: 130733
2011-05-02 22:25:45 +00:00
Devang Patel bb35e8ba88 Scanning entire basic block may be too expensive in terms of compile time. Instead, just use whatever location info first non-phi instruction has.
llvm-svn: 130729
2011-05-02 21:57:00 +00:00
Jakob Stoklund Olesen 16f7cf6a2f Handle <def,undef> in the second loop as well.
llvm-svn: 130718
2011-05-02 20:36:53 +00:00
Eric Christopher 39b56b4b9f Apparently the check for direct calls is unnecessary.
llvm-svn: 130716
2011-05-02 20:16:33 +00:00
Jakob Stoklund Olesen 6297a715dc Use the PrintReg adaptor to correctly print live-in registers in debug output.
llvm-svn: 130715
2011-05-02 20:06:30 +00:00
Jakob Stoklund Olesen 7dffc8ecf2 Only ignore <undef> use operands, keep the <def,undef> ops.
Def operands may also have an <undef> flag, but that just means that a
sub-register redef doesn't actually read the super-register. For physical
registers, it has no meaning.

llvm-svn: 130714
2011-05-02 20:06:28 +00:00
Rafael Espindola 75e70e16e0 Pass -disable-cfi to llc.
llvm-svn: 130713
2011-05-02 19:51:34 +00:00
Rafael Espindola 7219831894 llvmc: Pass -disable-cfi to llc.
llvm-svn: 130712
2011-05-02 19:45:24 +00:00
Duncan Sands f91c5ab341 Fix PR9579: when simplifying a compare to "true" or "false", and it was
a vector compare, generate a vector result rather than i1 (and crashing).

llvm-svn: 130706
2011-05-02 18:51:41 +00:00
Duncan Sands 6b699f863f Remove unused variable.
llvm-svn: 130705
2011-05-02 18:41:29 +00:00
Devang Patel 420ab5f180 Emit debug info for global variables first.
This works around a limitation in gdb which is reported by following inherit.exp test failures from gdb testsuite.

gdb.cp/inherit.exp: print g_vB.vB::vb
gdb.cp/inherit.exp: print g_vB.vB::vx
gdb.cp/inherit.exp: print g_vC.vC::vc
gdb.cp/inherit.exp: print g_vC.vC::vx
gdb.cp/inherit.exp: print g_vD.vB::vb
...

llvm-svn: 130702
2011-05-02 18:19:17 +00:00
Duncan Sands d47ba853fc Forgot to commit the changes to this file.
llvm-svn: 130695
2011-05-02 16:34:19 +00:00
Duncan Sands a3e3699c88 Move some rem transforms out of instcombine and into instsimplify.
This automagically provides a transform noticed by my super-optimizer
as occurring quite often: "rem x, (select cond, x, 1)" -> 0.

llvm-svn: 130694
2011-05-02 16:27:02 +00:00
Rafael Espindola 5164e6e8b2 Add 130690 back.
llvm-svn: 130693
2011-05-02 15:58:16 +00:00
Rafael Espindola e406670954 Only produce the eh_frame section if we have at least one personality function.
llvm-svn: 130692
2011-05-02 15:49:52 +00:00
Rafael Espindola a392475865 Revert while I debug the tests that use march but not mtriple.
llvm-svn: 130691
2011-05-02 15:42:31 +00:00
Rafael Espindola c2aad4f2a3 Move ppc OS X to cfi too. I am building it on an old ppc mini, but it will take some time.
llvm-svn: 130690
2011-05-02 15:00:52 +00:00
Chandler Carruth 5e9f05c2b8 Remove an unused variable in NDEBUG (found with -Wunused-variable).
llvm-svn: 130688
2011-05-02 05:49:01 +00:00
Jakob Stoklund Olesen 7d4067936a Minimize the slot indexes spanned by register ranges created when splitting.
When an interfering live range ends at a dead slot index between two
instructions, make sure that the inserted copy instruction gets a slot index
after the dead ones. This makes it possible to avoid the interference.

Ideally, there shouldn't be interference ending at a deleted instruction, but
physical register coalescing can sometimes do that to sub-registers.

This fixes PR9823.

llvm-svn: 130687
2011-05-02 05:29:58 +00:00
Jakob Stoklund Olesen 55f1e202a8 Add a SlotIndexes::insertMachineInstrInMaps to insert the instruction after any null indexes.
This makes a difference if a live interval is referring to a deleted
instruction. It can be important to insert an instruction before or after a
deleted instruction to avoid interference.

llvm-svn: 130686
2011-05-02 05:29:56 +00:00
Nick Lewycky e75ffa1b78 In option typo correction, consider -foo=VALUE flags as two distinct parts. The
comments claimed it did this, but the LHS value was actually an unused variable.

The new system considers only the '-foo' part when comparing it for typos
against flags that have values, but still look at the whole string for flags
that don't. That way, we'll still correct '-inst=combine' to '-instcombine'.

llvm-svn: 130685
2011-05-02 05:24:47 +00:00
Nick Lewycky 5f1eb968f0 Remove dead variable pointed out by GCC 4.6 warnings, and reflow this a little
to scope a variable more tightly per llvm coding style. No functional change.

llvm-svn: 130684
2011-05-02 05:05:29 +00:00
Chris Lattner 23f61a09af enhance memcpyopt to obey -fno-builtin and friends. This addresses a
problem reported on cfe-dev.

llvm-svn: 130661
2011-05-01 18:27:11 +00:00
Rafael Espindola fc8223670a Add r130623 back now that ELF has been fixed to work with -fno-dwarf2-cfi-asm.
llvm-svn: 130658
2011-05-01 15:44:13 +00:00
NAKAMURA Takumi 4471f82e91 Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.

llvm-svn: 130657
2011-05-01 13:29:49 +00:00
Chandler Carruth ddc91b25e3 Remove an unused variable from this function introduced in r130637,
likely a result of copy/paste.

llvm-svn: 130640
2011-05-01 06:14:10 +00:00
Rafael Espindola 750cb61553 GCC uses a different encoding of pointers in the FDE when using
-fno-dwarf2-cfi-asm. Implement the same behavior.

llvm-svn: 130637
2011-05-01 04:49:54 +00:00
Rafael Espindola 95215a76cd I forgot these files in the previous commit.
llvm-svn: 130635
2011-05-01 04:19:24 +00:00
Rafael Espindola fd05785324 Simplify the handling of pcrel relocations on ELF. Now we do the right thing
for all symbol differences and can drop the old EmitPCRelSymbolValue
method.

This also make getExprForFDESymbol on ELF equal to the one on MachO, and it
can be made non-virtual.

llvm-svn: 130634
2011-05-01 03:50:49 +00:00
Oscar Fuentes 3cbc9bece8 Update instructions: LLVM.cmake is now LLVMConfig.cmake
llvm-svn: 130631
2011-05-01 02:12:20 +00:00
Rafael Espindola b7c2286055 Revert the previous patch while I figure out how to make llvm-gcc
less agressive about disabling cfi on linux :-(

llvm-svn: 130626
2011-04-30 23:03:44 +00:00
Jakob Stoklund Olesen 2348cdd67f X86AsmPrinter doesn't know how to handle the X86II::MO_GOT_ABSOLUTE_ADDRESS flag
after folding ADD32ri to ADD32mi, so don't do that.

This only happens when the greedy register allocator gets itself in trouble and
spills %vreg9 here:

16L             %vreg9<def> = MOVPC32r 0, %ESP<imp-use>; GR32:%vreg9
48L             %vreg9<def> = ADD32ri %vreg9, <es:_GLOBAL_OFFSET_TABLE_>[TF=1], %EFLAGS<imp-def,dead>; GR32:%vreg9

That should never happen, the live range should be split instead.

llvm-svn: 130625
2011-04-30 23:00:05 +00:00
Rafael Espindola 5265bc483e Enable CFI on OS X.
Currently the output should be almost identical to the one produced by CodeGen
to make the transition easier.

The only two differences I know of are:

* Some files get an extra advance loc of size 0. This will be fixed when
relaxations are enabled.
* The optimization of declaring an EH symbol as an external variable is not
implemented. This is a subset of adding the nounwind attribute, so we if really
this at -O0 we should probably do it at the IL level.

llvm-svn: 130623
2011-04-30 22:29:54 +00:00