Mikhail Glushenkov
b2f9a73029
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Devang Patel
e067a7988c
Validate debug info values only if DwarfDebug is initialized.
...
llvm-svn: 62298
2009-01-16 02:15:14 +00:00
Devang Patel
32fed1c0ef
Any debug info symbol is only valid if atleast one compile unit is seen.
...
llvm-svn: 62294
2009-01-16 01:49:46 +00:00
Dan Gohman
ceac7c34f1
Initial hazard recognizer support in post-pass scheduling. This includes
...
a new toy hazard recognizier heuristic which attempts to direct the
scheduler to avoid clumping large groups of loads or stores too densely.
llvm-svn: 62291
2009-01-16 01:33:36 +00:00
Devang Patel
fa1b408b3b
Do not stumble over forward declared struct member.
...
llvm-svn: 62288
2009-01-16 00:50:53 +00:00
Devang Patel
76d190cf4a
Validate dbg_* intrinsics before lowering them.
...
llvm-svn: 62286
2009-01-15 23:41:32 +00:00
Mon P Wang
e248edff1b
Added missing support to widen an operand from a bit convert.
...
llvm-svn: 62285
2009-01-15 22:43:38 +00:00
Dan Gohman
7e105f0b12
Generalize the HazardRecognizer interface so that it can be used
...
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.
llvm-svn: 62284
2009-01-15 22:18:12 +00:00
Dan Gohman
79618d1de8
Simplify the MachineLICM pass by having it only traverse outer
...
loops, hoisting instructions all the way out in one step rather
than hoisting them one nest level at a time. Also, make a few
other code simplifications. This speeds up MachineLICM
by several fold.
llvm-svn: 62283
2009-01-15 22:01:38 +00:00
Rafael Espindola
6de96a1b5d
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Devang Patel
851cdaf1fd
Use lightweight DebugInfo objects directly.
...
llvm-svn: 62276
2009-01-15 19:26:23 +00:00
Dan Gohman
619ef48a52
Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
...
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.
To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.
llvm-svn: 62275
2009-01-15 19:20:50 +00:00
Devang Patel
8bdc698336
Use variable's context to identify respective DbgScope.
...
Use light weight DebugInfo object directly.
llvm-svn: 62269
2009-01-15 18:25:17 +00:00
Dan Gohman
307954ac69
Make getWidenVectorType const; this file was missed in the
...
previous commit.
llvm-svn: 62266
2009-01-15 17:39:39 +00:00
Dan Gohman
91febd1330
More consts on TargetLowering references.
...
llvm-svn: 62262
2009-01-15 16:58:17 +00:00
Dan Gohman
4bdf021e05
Use const with TargetLowering references in a few more places.
...
llvm-svn: 62260
2009-01-15 16:43:02 +00:00
Gabor Greif
08a4c281cb
minor refactoring: use a more specific API
...
llvm-svn: 62256
2009-01-15 11:10:44 +00:00
Devang Patel
dedd3e1e14
Do not construct debug scope if RootScope *is* null.
...
llvm-svn: 62209
2009-01-14 01:34:32 +00:00
Devang Patel
3c82aa0209
Removoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that were used to handle debug info.
...
llvm-svn: 62199
2009-01-13 23:54:55 +00:00
Devang Patel
7b13aeedea
Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
...
llvm-svn: 62191
2009-01-13 23:02:17 +00:00
Devang Patel
fe9581f0cd
Undo previous checkin.
...
llvm-svn: 62190
2009-01-13 22:54:57 +00:00
Devang Patel
dd25a9d0aa
Use DwarfWriter to record dbg variables.
...
llvm-svn: 62185
2009-01-13 21:44:10 +00:00
Devang Patel
ca997988c3
Use dwarf writer to decide whether the module has debug info or not.
...
llvm-svn: 62184
2009-01-13 21:25:00 +00:00
Dan Gohman
5d4afb7bd9
Use assertions to check for conditions that should never happen.
...
llvm-svn: 62178
2009-01-13 20:25:24 +00:00
Dan Gohman
1407484178
The list-td and list-tdrr schedulers don't yet support physreg
...
scheduling dependencies. Add assertion checks to help catch
this.
It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.
llvm-svn: 62177
2009-01-13 20:24:13 +00:00
Dan Gohman
13141d5538
Avoid referring to edge D after the Succs or Preds arrays have
...
been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.
llvm-svn: 62173
2009-01-13 19:08:45 +00:00
Duncan Sands
ffc6133318
When replacing uses and the same node is reached
...
via two paths, process it once not twice, d'oh!
Analysis, testcase and original patch thanks to
Mon Ping Wang.
llvm-svn: 62169
2009-01-13 15:17:14 +00:00
Duncan Sands
90d2a7bd72
Fix some typos. Also, the WidenedVectors map
...
was not being cleaned by ExpungeNode.
llvm-svn: 62167
2009-01-13 14:42:39 +00:00
Duncan Sands
013be76241
Correct a comment - this is not a sign extension.
...
llvm-svn: 62166
2009-01-13 14:04:14 +00:00
Evan Cheng
4f9c47aab9
Un-tabify.
...
llvm-svn: 62151
2009-01-13 06:08:37 +00:00
Evan Cheng
f343168f1f
FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.
...
llvm-svn: 62144
2009-01-13 03:57:45 +00:00
Devang Patel
5c6e1e3b7d
Use DebugInfo interface to lower dbg_* intrinsics.
...
llvm-svn: 62127
2009-01-13 00:35:13 +00:00
Devang Patel
f3456e8f07
Start using DebugInfo API to emit debug info.
...
llvm-svn: 62125
2009-01-13 00:20:51 +00:00
Devang Patel
243b4add9a
Emit debug info, only if at least one compile unit is seen.
...
llvm-svn: 62118
2009-01-12 23:09:42 +00:00
Devang Patel
b71fbeb19f
If multiple compile units are seen then emit them independently. In other words, do not force all DIEs into first, whatever it is, compile unit.
...
Note, multiple compile unit support is not well tested (it did not work correctly until now anyway.)
llvm-svn: 62116
2009-01-12 23:05:55 +00:00
Devang Patel
4aa4128ced
Avoid cast<>, use light weith wrapper directly.
...
llvm-svn: 62115
2009-01-12 22:58:14 +00:00
Devang Patel
4223582f00
Use SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.
...
llvm-svn: 62114
2009-01-12 22:54:42 +00:00
Duncan Sands
dc020f9c3c
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Devang Patel
df31a7256d
Add DwarfWriter interface to mainipulate source location info.
...
( May be this info should be directly handled by the dwarf writer ? )
llvm-svn: 62096
2009-01-12 19:17:34 +00:00
Devang Patel
f033d53264
Clear debug info at the end of function processing.
...
llvm-svn: 62092
2009-01-12 18:48:36 +00:00
Devang Patel
5daa1abf25
There is no need to maintain separate labelid list in the dwarf writer. It is not a good idea.
...
llvm-svn: 62090
2009-01-12 18:41:00 +00:00
Evan Cheng
b2c42c648d
Fix PR3241: Currently EmitCopyFromReg emits a copy from the physical register to a virtual register unless it requires an expensive cross class copy. That means we are only treating "expensive to copy" register dependency as physical register dependency.
...
Also future proof the scheduler to handle "normal" physical register dependencies. The code is not exercised yet.
llvm-svn: 62074
2009-01-12 03:19:55 +00:00
Owen Anderson
45cfef2cb6
More two-address fixes. This gets lua working with join-creation enabled.
...
llvm-svn: 62073
2009-01-12 03:10:40 +00:00
Evan Cheng
e3108148e2
CheckForPhysRegDependency should not return copy cost. It's not used. No functionality change.
...
llvm-svn: 62036
2009-01-11 08:53:35 +00:00
Devang Patel
af7d04207c
Reduce initial small vector sizes.
...
llvm-svn: 62023
2009-01-10 02:42:49 +00:00
Devang Patel
5491f25810
Fix thinko. Create parent scope if parent descriptor is *not* null.
...
llvm-svn: 62022
2009-01-10 02:34:18 +00:00
Evan Cheng
ed74d8ac2a
Duplicated node may produce a non-physical register def.
...
llvm-svn: 62015
2009-01-09 22:44:02 +00:00
Evan Cheng
0c4fe2600a
Minor debug output tweak.
...
llvm-svn: 62005
2009-01-09 20:42:34 +00:00
Devang Patel
235acaa131
Request DwarfWriter. This will be used to handle dbg_* intrinsics.
...
llvm-svn: 61999
2009-01-09 19:11:50 +00:00
Misha Brukman
5cbf223916
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Devang Patel
f646668799
Convert DwarfWriter into a pass.
...
Now Users request DwarfWriter through getAnalysisUsage() instead of creating an instance of DwarfWriter object directly.
llvm-svn: 61955
2009-01-08 23:40:34 +00:00
Dan Gohman
f87dc9264a
Delete unnecessary parens around return values.
...
llvm-svn: 61950
2009-01-08 22:19:34 +00:00
Devang Patel
65143c537c
Add DebugInfo based APIs to record source line info.
...
llvm-svn: 61928
2009-01-08 17:19:22 +00:00
Misha Brukman
572f2646c2
* Moved author attribution to CREDITS.TXT
...
* Removed trailing whitespace
llvm-svn: 61927
2009-01-08 16:40:25 +00:00
Misha Brukman
da46748ad2
* Alphabetized #includes
...
* Removed trailing whitespace
llvm-svn: 61926
2009-01-08 15:50:22 +00:00
Devang Patel
145a7cfa85
Add APIs to record regions and variables.
...
Again, shamelessly copied from MMI.
llvm-svn: 61912
2009-01-08 02:49:34 +00:00
Devang Patel
fbbe93bf68
Add APIs to manage scope using DebugInfo interface.
...
This is a shameless copy of similar APIs from MachineModuleInfo. The copy from MMI will be deleted in near future.
llvm-svn: 61908
2009-01-08 02:33:41 +00:00
Dan Gohman
261ee6be57
Remove redundant 'else's. No functionality change.
...
llvm-svn: 61891
2009-01-07 22:30:55 +00:00
Evan Cheng
f6768bd9cb
The coalescer does not coalesce a virtual register to a physical register if any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away:
...
v1024 = EDI // not killed
=
= EDI
One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead.
This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions.
llvm-svn: 61847
2009-01-07 02:08:57 +00:00
Dan Gohman
c7847cdb8d
Fix a bug in ComputeLinearIndex computation handling multi-level
...
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.
llvm-svn: 61828
2009-01-06 22:53:52 +00:00
Devang Patel
928d465b6b
Set up DwarfDebug using DebugInfo API.
...
llvm-svn: 61822
2009-01-06 21:07:30 +00:00
Bill Wendling
a055b8c0d3
Forgot that this was needed for Linux. This should fix the builds.
...
llvm-svn: 61819
2009-01-06 19:13:55 +00:00
Owen Anderson
f04100a50d
The phi construction algorithm used for interval reconstruction is complicated by
...
two address instructions. We need to keep track of things we've processed AS USES
independetly of whether we've processed them as defs.
This fixes all known miscompilations when reconstruction is turned on.
llvm-svn: 61802
2009-01-06 07:53:32 +00:00
Dan Gohman
bf8e5204d1
Update these argument lists for the isNormalMemory
...
argument. This doesn't affect current functionality.
llvm-svn: 61779
2009-01-06 01:28:56 +00:00
Dan Gohman
79c3516912
Use a latency value of 0 for the artificial edges inserted by
...
AddPseudoTwoAddrDeps. This lets the scheduling infrastructure
avoid recalculating node heights. In very large testcases this
was a major bottleneck. Thanks to Roman Levenstein for finding
this!
As a side effect, fold-pcmpeqd-0.ll is now scheduled better
and it no longer requires spilling on x86-32.
llvm-svn: 61778
2009-01-06 01:19:04 +00:00
Devang Patel
244a649764
Construct subprogram DIEs using DebugInfo.
...
llvm-svn: 61772
2009-01-05 23:21:35 +00:00
Devang Patel
245a73ac16
Construct global variable DIEs using DebugInfo.
...
llvm-svn: 61771
2009-01-05 23:11:11 +00:00
Devang Patel
0479d7647f
Construct compile unit dies using DebugInfo.
...
llvm-svn: 61768
2009-01-05 23:03:32 +00:00
Bill Wendling
f9b5ba7bcb
Revert r61415 and r61484. Duncan was correct that these weren't needed.
...
llvm-svn: 61765
2009-01-05 22:53:45 +00:00
Dan Gohman
52d4d8244b
Don't call setDepthDirty/setHeightDirty when adding an edge
...
with latency 0, since it doesn't affect the depth or height.
llvm-svn: 61762
2009-01-05 22:40:26 +00:00
Devang Patel
ced6524437
Extract source location info from DebugInfo.
...
Add methods to add source location info in a DIE.
llvm-svn: 61761
2009-01-05 22:35:52 +00:00
Devang Patel
c0a190085d
Add type DIEs using DebugInfo.
...
llvm-svn: 61757
2009-01-05 21:47:57 +00:00
Devang Patel
1054a852b2
Construct composite type DIE using DebugInfo.
...
llvm-svn: 61741
2009-01-05 19:55:51 +00:00
Dan Gohman
dbc6c31f62
TargetLowering.h #includes SelectionDAGNodes.h, so it doesn't need its
...
own OpActionsCapacity magic number; it can just use ISD::BUILTIN_OP_END,
as long as it takes care to round up when needed.
llvm-svn: 61733
2009-01-05 19:40:39 +00:00
Devang Patel
2c2eeabb54
s/ConstructType/ConstructTypeDIE/g
...
llvm-svn: 61731
2009-01-05 19:07:53 +00:00
Devang Patel
5024d377f2
Construct stuct field DIEs.
...
llvm-svn: 61729
2009-01-05 18:59:44 +00:00
Devang Patel
c0adc6b9bc
Construct enumerator DIE using DebugInfo.
...
llvm-svn: 61726
2009-01-05 18:38:38 +00:00
Devang Patel
758e7d7781
Construct array/vector type DIEs using DebugInfo.
...
llvm-svn: 61724
2009-01-05 18:33:01 +00:00
Owen Anderson
96fce00dc0
Get rid of sentinel insertion in interval reconstruction. It just masked the
...
problem, rather than fixing it. The problem has now been fixed the right way.
llvm-svn: 61723
2009-01-05 18:32:26 +00:00
Dan Gohman
906152a20f
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Devang Patel
1e03f7f19e
Construct basic and derived type DIEs using DebugInfo.
...
llvm-svn: 61714
2009-01-05 17:57:47 +00:00
Devang Patel
15deef2a3c
subsume ConstructPointerType()
...
llvm-svn: 61711
2009-01-05 17:45:59 +00:00
Devang Patel
ef2a94e8df
subsume ConstructBasicType().
...
llvm-svn: 61709
2009-01-05 17:44:11 +00:00
Devang Patel
56a8bb670f
squash warnings.
...
llvm-svn: 61707
2009-01-05 17:31:22 +00:00
Chris Lattner
8f561c9c97
elf writer really wants the size of the global, not the size
...
of the pointer to the global.
llvm-svn: 61630
2009-01-04 20:19:20 +00:00
Bill Wendling
ac79602005
The llvm::ELFWriter::EmitGlobal() method is calling the
...
llvm::PATypeHolder::get() method when LLVM is self-hosted in Release
mode. Before the parser changed, there was a definition of llvm::PAHolder::get()
in llvmAsmParser.y. This was probably a bug that no-one noticed.
Explicitly #include the Type.h file as a temporary fix for now.
llvm-svn: 61620
2009-01-04 01:47:14 +00:00
Dan Gohman
b9fa1d24f8
Fix a DAGCombiner abort on an invalid shift count constant. This fixes PR3250.
...
llvm-svn: 61613
2009-01-03 19:22:06 +00:00
Dan Gohman
4d41fdf4ca
CommuteNodesToReducePressure() is now removed.
...
llvm-svn: 61612
2009-01-03 19:19:30 +00:00
Dan Gohman
1be2e9650e
Remove the code from the scheduler that commuted two-address
...
instructions to avoid copies, because TwoAddressInstructionPass
also does this optimization. The scheduler's version didn't
account for live-out values, which resulted in spurious commutes
and missed opportunities.
Now, TwoAddressInstructionPass handles all the opportunities,
instead of just those that the scheduler missed. The result is
usually the same, though there are occasional trivial differences
resulting from the avoidance of spurious commutes.
llvm-svn: 61611
2009-01-03 18:01:46 +00:00
Duncan Sands
953c9c2fbc
Factorize (and generalize) the code promoting SELECT
...
and BRCOND conditions. Reorder a few methods while
there.
llvm-svn: 61547
2009-01-01 20:36:20 +00:00
Duncan Sands
19ee60848a
Remove trailing spaces.
...
llvm-svn: 61545
2009-01-01 19:56:02 +00:00
Duncan Sands
8feb694e8f
Fix PR3274: when promoting the condition of a BRCOND node,
...
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType. In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).
llvm-svn: 61542
2009-01-01 15:52:00 +00:00
Owen Anderson
8b86b9ca47
Get live interval reconstruction several steps closer to working.
...
llvm-svn: 61514
2008-12-31 02:00:25 +00:00
Bill Wendling
03f2af79b8
Linux wants the FDE initial location and address range to be forced to 32-bit.
...
Darwin doesn't. Make this optional for platforms.
llvm-svn: 61484
2008-12-29 22:12:11 +00:00
Bill Wendling
b13c83ac18
The FDE initial location and address range data should be free to be 64-bit
...
(quad) on a 64-bit platform. This fixes a problem with EH frames on Darwin.
llvm-svn: 61483
2008-12-29 21:51:42 +00:00
Duncan Sands
43b18241ff
Add braces, as suggested by a gcc warning.
...
llvm-svn: 61465
2008-12-29 08:05:02 +00:00
Scott Michel
0c9259f149
Teach LeaglizeDAG that i64 mul can be a libcall.
...
llvm-svn: 61463
2008-12-29 03:21:37 +00:00
Owen Anderson
b5232286a7
Fix up kill/dead marking in the new live interval reconstruction code.
...
llvm-svn: 61460
2008-12-28 23:35:13 +00:00
Owen Anderson
37751bb9d9
Add prototype code for recomputing a live interval's ranges and valnos through recursive phi construction.
...
llvm-svn: 61458
2008-12-28 21:48:48 +00:00
Bill Wendling
d6bd7e9372
Darwin likes for the EH frame to be non-local.
...
llvm-svn: 61420
2008-12-24 08:05:17 +00:00
Bill Wendling
066b5f6724
GCC doesn't emit DW_EH_PE_sdata4 for the FDE encoding on Darwin. I'm not sure
...
about other platforms.
llvm-svn: 61415
2008-12-24 05:25:49 +00:00
Dale Johannesen
ee573fcefc
Change comments so everybody can understand them, hopefully.
...
llvm-svn: 61405
2008-12-23 23:47:22 +00:00
Dale Johannesen
acc84e5aa0
Add another permutation where we should get rid of a-a.
...
llvm-svn: 61401
2008-12-23 23:01:27 +00:00
Anton Korobeynikov
f4a66e8dda
Restore debug printing
...
llvm-svn: 61398
2008-12-23 22:26:18 +00:00
Anton Korobeynikov
d305d00796
Sometimes APInt syntax is really ugly... :(
...
llvm-svn: 61397
2008-12-23 22:26:01 +00:00
Anton Korobeynikov
05149bad18
Indent stuff properly
...
llvm-svn: 61396
2008-12-23 22:25:45 +00:00
Anton Korobeynikov
6f219132a7
Initial checkin of APInt'ififcation of switch lowering
...
llvm-svn: 61395
2008-12-23 22:25:27 +00:00
Devang Patel
70bd60d1d4
Fix typo.
...
Silence unused variable warning.
llvm-svn: 61391
2008-12-23 21:55:38 +00:00
Devang Patel
323dbe57a6
Silience unused warnings.
...
llvm-svn: 61390
2008-12-23 21:55:04 +00:00
Dan Gohman
12f2490489
Clean up the atomic opcodes in SelectionDAG.
...
This removes all the _8, _16, _32, and _64 opcodes and replaces each
group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode
is now used to carry the size information. In tablegen, the size-specific
opcodes are replaced by size-independent opcodes that utilize the
ability to compose them with predicates.
This shrinks the per-opcode tables and makes the code that handles
atomics much more concise.
llvm-svn: 61389
2008-12-23 21:37:04 +00:00
Dan Gohman
04543e719e
Rename BuildSchedUnits to BuildSchedGraph, and refactor the
...
code in ScheduleDAGSDNodes' BuildSchedGraph into separate functions.
llvm-svn: 61376
2008-12-23 18:36:58 +00:00
Dan Gohman
072e52f170
Use isTerminator() instead of isBranch()||isReturn() in
...
several places. isTerminator() returns true for a superset
of cases, and includes things like FP_REG_KILL, which are
nither return or branch but aren't safe to move/remat/etc.
llvm-svn: 61373
2008-12-23 17:28:50 +00:00
Dan Gohman
92cf280dfb
Avoid an unnecessary call to allnodes_size(), which is linear.
...
llvm-svn: 61372
2008-12-23 17:24:50 +00:00
Dan Gohman
3a57213e38
Minor code simplifications.
...
llvm-svn: 61371
2008-12-23 17:22:32 +00:00
Dale Johannesen
d2a4685860
One more permutation of subtracting off a base value.
...
llvm-svn: 61361
2008-12-23 01:59:54 +00:00
Dan Gohman
014caa431c
Refactor a bunch of code out of AsmPrinter::EmitGlobalConstant into separate
...
functions.
llvm-svn: 61345
2008-12-22 21:14:27 +00:00
Dan Gohman
a04542b61e
Optimize setDepthDirty and setHeightDirty a little, as they showed
...
up on a profile.
llvm-svn: 61344
2008-12-22 21:11:33 +00:00
Dan Gohman
24fe9a1dc2
Use SmallVector's pop_back_val.
...
llvm-svn: 61277
2008-12-20 16:42:33 +00:00
Dan Gohman
bb92a1b815
Use the correct Preds and Succs lists in setHeightDirty()
...
and setDepthDirty(), respectively. This fixes PR3241.
llvm-svn: 61276
2008-12-20 16:34:57 +00:00
Dan Gohman
650b1e7ff8
Use ~0u instead of -1u as the special value, to hopefully avoid
...
warnings on compilers that warn about such things.
llvm-svn: 61263
2008-12-19 22:23:43 +00:00
Evan Cheng
0869f78555
Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.
...
172 %ECX<def> = MOV32rr %reg1039<kill>
180 INLINEASM <es:subl $5,$1
sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188 %EAX<def> = MOV32rr %EAX<kill>
196 %ECX<def> = MOV32rr %ECX<kill>
204 %ECX<def> = MOV32rr %ECX<kill>
212 %EAX<def> = MOV32rr %EAX<kill>
220 %EAX<def> = MOV32rr %EAX
228 %reg1039<def> = MOV32rr %ECX<kill>
The early clobber operand ties ECX input to the ECX def.
The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0) 0@174-(230) 1@46-(47)
The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0) 0@174-(182) 1@181-230 @2@46-(47)
Of course that won't work since that means overlapping live ranges defined by two val#.
The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.
llvm-svn: 61259
2008-12-19 20:58:01 +00:00
Chris Lattner
9c148c8fc2
Fix some release-assert warnings
...
llvm-svn: 61244
2008-12-19 17:03:38 +00:00
Rafael Espindola
770b4b830a
Fix bug 3202.
...
The EH_frame and .eh symbols are now private, except for darwin9 and earlier.
The patch also fixes the definition of PrivateGlobalPrefix on pcc linux.
llvm-svn: 61242
2008-12-19 10:55:56 +00:00
Bill Wendling
19a54ffc7f
Perform this loop only when the -debug flag is specified.
...
llvm-svn: 61238
2008-12-19 02:09:57 +00:00
Dan Gohman
8c82a8a984
Initialize the ImplicitDefed member, to avoid getting stale
...
data from a previous block.
llvm-svn: 61237
2008-12-19 00:46:20 +00:00
Dan Gohman
9abd04bf3f
Teach LowerSubregs to preserve kill/dead information when lowering
...
subreg instructions.
llvm-svn: 61220
2008-12-18 22:14:08 +00:00
Dan Gohman
c4ce336205
Make LowerSubregs' debug output for EXTRACT_SUBREG consistent with
...
that of INSERT_SUBREG and SUBREG_TO_REG.
llvm-svn: 61218
2008-12-18 22:11:34 +00:00
Dan Gohman
d38c00c85b
Fix a copy+pasto in an assertion message.
...
llvm-svn: 61217
2008-12-18 22:07:25 +00:00
Dan Gohman
451afdd9fe
Fix indentation level.
...
llvm-svn: 61216
2008-12-18 22:06:01 +00:00
Dan Gohman
0ab1144c79
Print subreg information in MachineInstr::dump.
...
llvm-svn: 61213
2008-12-18 21:51:27 +00:00
Mon P Wang
a501640ffa
Added support for vector widening.
...
llvm-svn: 61209
2008-12-18 20:03:17 +00:00
Dan Gohman
83682a9441
Give MachineLICM a name, for -time-passes etc.
...
llvm-svn: 61184
2008-12-18 01:37:56 +00:00
Dan Gohman
b0ef9140e5
Move post-RA scheduling before branch folding for now, because branch
...
folding's tail merging doesn't currently preserve liveness information
which post-RA scheduling requires.
llvm-svn: 61183
2008-12-18 01:36:42 +00:00
Owen Anderson
ad4d2ab15b
Re-apply r61158 in a form that no longer breaks tests.
...
llvm-svn: 61182
2008-12-18 01:27:19 +00:00
Owen Anderson
59727c0496
Revert r61158 for now, as it caused some test failures.
...
llvm-svn: 61159
2008-12-17 22:17:27 +00:00
Owen Anderson
9389176009
Fix miscompilations caused by renumbering, and enable it as part of prealloc splitting.
...
llvm-svn: 61158
2008-12-17 22:06:59 +00:00
Mon P Wang
015a7f57b2
Fix expansion of vsetcc to set the high bit for true instead of 1.
...
llvm-svn: 61129
2008-12-17 08:49:47 +00:00
Dan Gohman
ce70fe2e25
Double the amount of memory reserved for SUnits. This is a
...
temporary workaround for an obscure bug. When node cloning is
used, it is possible that more SUnits will be created, and
if the SUnits std::vector has to reallocate, it will
invalidate all the graph edges.
llvm-svn: 61122
2008-12-17 04:30:46 +00:00
Dan Gohman
2a16bbe394
Use getDepth() and getHeight() instead of accessing the
...
Depth and Height members directly, as they may not be
current.
llvm-svn: 61121
2008-12-17 04:25:52 +00:00
Eli Friedman
6cf404f2d1
Fix for PR3225: disable a broken optimization in
...
DAGTypeLegalizer::ExpandShiftWithKnownAmountBit.
In terms of restoring the optimization, the best fix here isn't
obvious... any ideas?
llvm-svn: 61119
2008-12-17 03:35:17 +00:00
Dale Johannesen
f51dcef803
A new dag combine; several permutations of this
...
are there under ADD, this one was missing.
llvm-svn: 61107
2008-12-16 22:13:49 +00:00
Owen Anderson
5121ec3821
Add code to renumber split intervals into new vregs. This is disabled for now until I finish working out some iterator invalidation issues.
...
llvm-svn: 61104
2008-12-16 21:35:08 +00:00
Dan Gohman
b4d41e802f
Eliminate the loop that walks the critical path. Instead, just track the
...
position in the critical path during the main instruction walk. This
eliminates the need for the CritialAntiDep DenseMap.
llvm-svn: 61096
2008-12-16 19:27:52 +00:00
Dan Gohman
4476ef810b
Preserve SourceValue information when lowering produces multiple loads from
...
different offsets within the same stack slot.
llvm-svn: 61093
2008-12-16 18:25:36 +00:00
Evan Cheng
c35fc49477
We have decided not to support inline asm where an output operand with a matching input operand with incompatible type (i.e. either one is a floating point and the other is an integer or the sizes of the types differ). SelectionDAGBuild will catch these and exit with an error.
...
llvm-svn: 61092
2008-12-16 18:21:39 +00:00
Dan Gohman
51559185f1
Enable anti-dependence breaking by default when post-RA scheduling is enabled.
...
llvm-svn: 61078
2008-12-16 06:21:45 +00:00
Dan Gohman
4302b4a63c
When breaking an anti-dependency, don't use a register which has seen
...
one of its aliases defined. This is conservative, but tricky subreg
corner cases are outside the primary aim of this pass.
llvm-svn: 61077
2008-12-16 06:20:58 +00:00
Dan Gohman
b9a012156b
Add initial support for back-scheduling address computations,
...
especially in the case of addresses computed from loop induction
variables.
llvm-svn: 61075
2008-12-16 03:35:01 +00:00
Dan Gohman
405f2197a4
Remove some special-case logic in ScheduleDAGSDNodes's
...
latency computation code that is no longer needed with the
new method for handling latencies.
llvm-svn: 61074
2008-12-16 03:31:11 +00:00
Dan Gohman
dddc1ac7ea
Fix some register-alias-related bugs in the post-RA scheduler liveness
...
computation code. Also, avoid adding output-depenency edges when both
defs are dead, which frequently happens with EFLAGS defs.
Compute Depth and Height lazily, and always in terms of edge latency
values. For the schedulers that don't care about latency, edge latencies
are set to 1.
Eliminate Cycle and CycleBound, and LatencyPriorityQueue's Latencies array.
These are all subsumed by the Depth and Height fields.
llvm-svn: 61073
2008-12-16 03:25:46 +00:00
Dan Gohman
8f782bbb28
Add a simple target-independent heuristic to allow targets with no
...
instruction itinerary data to back-schedule loads.
llvm-svn: 61070
2008-12-16 02:38:22 +00:00
Dan Gohman
e3a6351f34
Move addPred and removePred out-of-line.
...
llvm-svn: 61067
2008-12-16 01:05:52 +00:00
Dan Gohman
17214e633d
Make addPred and removePred return void, since the return value is not
...
currently used by anything.
llvm-svn: 61066
2008-12-16 01:00:55 +00:00
Dan Gohman
cb6accfea9
This getEdgeAttributes doesn't need a template argument.
...
llvm-svn: 61065
2008-12-16 00:55:00 +00:00
Mon P Wang
580f2c7b61
Added support for splitting and scalarizing vector shifts.
...
llvm-svn: 61050
2008-12-15 21:44:00 +00:00
Dan Gohman
a7e139a3e6
Fix printing of PseudoSourceValues in SDNode graphs.
...
llvm-svn: 61036
2008-12-15 17:28:10 +00:00
Mon P Wang
ac4e120912
Added support to LegalizeType for expanding the operands of scalar to vector
...
and insert vector element. Modified extract vector element to extend the
result to match the expected promoted type.
llvm-svn: 61029
2008-12-15 06:57:02 +00:00
Duncan Sands
f312dc7729
Reapply r60997, this time without forgetting that
...
target constants are allowed to have an illegal
type.
llvm-svn: 61006
2008-12-14 09:43:15 +00:00
Bill Wendling
e5af6f1990
Temporarily revert r60997. It was causing this failure:
...
Running /Users/void/llvm/llvm.src/test/CodeGen/Generic/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll
Failed with exit(1) at line 1
while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll | llc | /usr/bin/grep 68719476738
Assertion failed: ((TypesNeedLegalizing || getTypeAction(VT) == Legal) && "Illegal type introduced after type legalization?"), function HandleOp, file /Users/void/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 493.
0 llc 0x0085392e char const* std::find<char const*, char>(char const*, char const*, char const&) + 98
1 llc 0x00853e63 llvm::sys::PrintStackTraceOnErrorSignal() + 593
2 libSystem.B.dylib 0x96cac09b _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1765097359
4 libSystem.B.dylib 0x96d24ec2 raise + 26
5 libSystem.B.dylib 0x96d3447f abort + 73
6 libSystem.B.dylib 0x96d26063 __assert_rtn + 101
7 llc 0x004f9018 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type llvm::cast<llvm::Sub
...
llvm-svn: 61001
2008-12-13 23:53:00 +00:00
Duncan Sands
24092271cc
LegalizeDAG is not supposed to introduce illegal
...
types into the DAG if they were not already there.
Check this with an assertion.
llvm-svn: 60997
2008-12-13 22:33:38 +00:00
Mon P Wang
472cd640fa
Remove assertion to allow promotion of a truncating store operand
...
llvm-svn: 60975
2008-12-13 08:16:43 +00:00
Mon P Wang
f95bd2078d
Added basic support for expanding VSETCC
...
llvm-svn: 60974
2008-12-13 08:15:14 +00:00
Duncan Sands
b6f09933c0
On big-endian machines it is wrong to do a full
...
width register load followed by a truncating
store for the copy, since the load will not place
the value in the lower bits. Probably partial
loads/stores can never happen here, but fix it
anyway.
llvm-svn: 60972
2008-12-13 07:18:38 +00:00
Devang Patel
42828e8168
Do not print empty DW_AT_comp_dir.
...
llvm-svn: 60965
2008-12-12 21:57:54 +00:00
Duncan Sands
8f352fe100
When expanding unaligned loads and stores do not make
...
use of illegal integer types: instead, use a stack slot
and copying via integer registers. The existing code
is still used if the bitconvert is to a legal integer
type.
This fires on the PPC testcases 2007-09-08-unaligned.ll
and vec_misaligned.ll. It looks like equivalent code
is generated with these changes, just permuted, but
it's hard to tell.
With these changes, nothing in LegalizeDAG produces
illegal integer types anymore. This is a prerequisite
for removing the LegalizeDAG type legalization code.
While there I noticed that the existing code doesn't
handle trunc store of f64 to f32: it turns this into
an i64 store, which represents a 4 byte stack smash.
I added a FIXME about this. Hopefully someone more
motivated than I am will take care of it.
llvm-svn: 60964
2008-12-12 21:47:02 +00:00
Evan Cheng
3270a1dec3
Fix add/sub expansion: don't create ADD / SUB with two results (seems like everyone is doing this these days :-). Patch by Daniel M Gessel!
...
llvm-svn: 60958
2008-12-12 18:49:09 +00:00
Duncan Sands
e4bcb8e2dd
When using a 4 byte jump table on a 64 bit machine,
...
do an extending load of the 4 bytes rather than a
potentially illegal (type) i32 load followed by a
sign extend.
llvm-svn: 60945
2008-12-12 08:13:38 +00:00
Mon P Wang
9c2d26d208
Added support for SELECT v8i8 v4i16 for X86 (MMX)
...
Added support for TRUNC v8i16 to v8i8 for X86 (MMX)
llvm-svn: 60916
2008-12-12 01:25:51 +00:00
Bill Wendling
1a317678bc
Redo the arithmetic with overflow architecture. I was changing the semantics of
...
ISD::ADD to emit an implicit EFLAGS. This was horribly broken. Instead, replace
the intrinsic with an ISD::SADDO node. Then custom lower that into an
X86ISD::ADD node with a associated SETCC that checks the correct condition code
(overflow or carry). Then that gets lowered into the correct X86::ADDOvf
instruction.
Similar for SUB and MUL instructions.
llvm-svn: 60915
2008-12-12 00:56:36 +00:00
Mon P Wang
bcdbfa854a
Avoid generating a convert_rndsat node when the src and dest type are the same.
...
llvm-svn: 60869
2008-12-11 03:30:13 +00:00
Bill Wendling
40d2476adc
Clarify FIXME.
...
llvm-svn: 60867
2008-12-11 01:26:44 +00:00
Mon P Wang
c68b3c4fc1
Whitespace clean up (tabs with spaces)
...
llvm-svn: 60866
2008-12-11 00:44:22 +00:00
Mon P Wang
b5eb7205ea
Make fix for r60829 less conservative to allow the proper optimization for
...
vec_extract-sse4.ll.
llvm-svn: 60865
2008-12-11 00:26:16 +00:00
Bill Wendling
d8681df4e7
Add a newline after this debug output.
...
llvm-svn: 60861
2008-12-10 23:24:43 +00:00
Bill Wendling
0864a75ebf
If ADD, SUB, or MUL have an overflow bit that's used, don't do transformation on
...
them. The DAG combiner expects that nodes that are transformed have one value
result.
llvm-svn: 60857
2008-12-10 22:36:00 +00:00
Duncan Sands
09ed3bba2b
For amusement, implement SADDO, SSUBO, UADDO, USUBO
...
for promoted integer types, eg: i16 on ppc-32, or
i24 on any platform. Complete support for arbitrary
precision integers would require handling expanded
integer types, eg: i128, but I couldn't be bothered.
llvm-svn: 60834
2008-12-10 12:30:42 +00:00
Mon P Wang
4637c3c698
Fixed a bug when trying to optimize a extract vector element of a
...
bit convert that changes the number of elements of a shuffle.
llvm-svn: 60829
2008-12-10 03:59:02 +00:00
Evan Cheng
0b77319742
Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin.
...
llvm-svn: 60828
2008-12-10 02:32:19 +00:00
Bill Wendling
f482f379ef
Whitespace changes.
...
llvm-svn: 60826
2008-12-10 02:01:32 +00:00
Bill Wendling
4eb2dcdc45
Whitespace fixes.
...
llvm-svn: 60818
2008-12-10 00:28:22 +00:00
Dan Gohman
43a120303b
Update CalcLatency to work in terms of edge latencies, rather than
...
node latencies. Use CalcLatency instead of manual code in
CalculatePriorities to keep it consistent. Previously it
computed slightly different results.
llvm-svn: 60817
2008-12-10 00:24:36 +00:00
Evan Cheng
288fbd2133
Fix a couple of Dwarf bugs.
...
- Emit DW_AT_byte_size for struct and union of size zero.
- Emit DW_AT_declaration for forward type declaration.
llvm-svn: 60812
2008-12-10 00:15:44 +00:00
Dan Gohman
2d170896ee
Rewrite the SDep class, and simplify some of the related code.
...
The Cost field is removed. It was only being used in a very limited way,
to indicate when the scheduler should attempt to protect a live register,
and it isn't really needed to do that. If we ever want the scheduler to
start inserting copies in non-prohibitive situations, we'll have to
rethink some things anyway.
A Latency field is added. Instead of giving each node a single
fixed latency, each edge can have its own latency. This will eventually
be used to model various micro-architecture properties more accurately.
The PointerIntPair class and an internal union are now used, which
reduce the overall size.
llvm-svn: 60806
2008-12-09 22:54:47 +00:00
Dan Gohman
9356d8f74d
Minor code simplification.
...
llvm-svn: 60804
2008-12-09 22:45:08 +00:00
Bill Wendling
db8ec2d75a
Add sub/mul overflow intrinsics. This currently doesn't have a
...
target-independent way of determining overflow on multiplication. It's very
tricky. Patch by Zoltan Varga!
llvm-svn: 60800
2008-12-09 22:08:41 +00:00
Duncan Sands
445071c44f
Fix PR3117: not all nodes being legalized. The
...
essential problem was that the DAG can contain
random unused nodes which were never analyzed.
When remapping a value of a node being processed,
such a node may become used and need to be analyzed;
however due to operands being transformed during
analysis the node may morph into a different one.
Users of the morphing node need to be updated, and
this wasn't happening. While there I added a bunch
of documentation and sanity checks, so I (or some
other poor soul) won't have to scratch their head
over this stuff so long trying to remember how it
was all supposed to work next time some obscure
problem pops up! The extra sanity checking exposed
a few places where invariants weren't being preserved,
so those are fixed too. Since some of the sanity
checking is expensive, I added a flag to turn it
on. It is also turned on when building with
ENABLE_EXPENSIVE_CHECKS=1.
llvm-svn: 60797
2008-12-09 21:33:20 +00:00
Evan Cheng
74a24b260e
Cosmetic changes.
...
llvm-svn: 60771
2008-12-09 17:56:30 +00:00
Dan Gohman
7d32974069
Whitespace cleanups.
...
llvm-svn: 60769
2008-12-09 16:37:48 +00:00
Mon P Wang
8a5366332f
In LegalizeOp, don't change the result type of CONVERT_RNDSAT when promoting
...
one of its operand.
llvm-svn: 60749
2008-12-09 07:27:39 +00:00
Mon P Wang
4dd832d241
Fix getNode to allow a vector for the shift amount for shifts of vectors.
...
Fix the shift amount when unrolling a vector shift into scalar shifts.
Fix problem in getShuffleScalarElt where it assumes that the input of
a bit convert must be a vector.
llvm-svn: 60740
2008-12-09 05:46:39 +00:00
Dan Gohman
37c496979c
Don't charge full latency for an anti-dependence, in this simplistic
...
pipeline model.
llvm-svn: 60733
2008-12-09 00:26:46 +00:00
Dan Gohman
f90d3b096a
Fix the top-level comments, and fix some 80-column violations.
...
llvm-svn: 60707
2008-12-08 17:50:35 +00:00
Dan Gohman
4c31524bec
Factor out the code for sign-extending/truncating gep indices
...
and use it in x86 address mode folding. Also, make
getRegForValue return 0 for illegal types even if it has a
ValueMap for them, because Argument values are put in the
ValueMap. This fixes PR3181.
llvm-svn: 60696
2008-12-08 07:57:47 +00:00
Dan Gohman
91dfc08809
Move createVirtualRegister out-of-line.
...
llvm-svn: 60684
2008-12-08 04:54:11 +00:00
Dan Gohman
9de2ac8e8b
Clarify some comments.
...
llvm-svn: 60683
2008-12-08 04:53:23 +00:00
Owen Anderson
12679470bf
Switch to top-down mode and fix a crasher this exposed caused by an error in the
...
live interval updating.
llvm-svn: 60652
2008-12-07 05:33:18 +00:00
Evan Cheng
43c0891838
Reason #3 from 60595 doesn't hold true. If we can fold a PIC load from constpool into a use, the rewrite happens at time of spill (not in VirtRegMap). Later on, if the GlobalBaseReg is spilled, the spiller can see the use uses GlobalBaseReg and do the right thing.
...
llvm-svn: 60596
2008-12-05 17:41:31 +00:00
Evan Cheng
994faaf218
Fix comment.
...
llvm-svn: 60592
2008-12-05 17:00:16 +00:00
Dan Gohman
d24be45d99
Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.
...
llvm-svn: 60586
2008-12-05 05:45:42 +00:00
Dan Gohman
9bb56443a1
Teach StackSlotColoring to update MachineMemOperands when
...
changing the stack slots on an instruction, to keep them
consistent with the actual memory addresses.
llvm-svn: 60584
2008-12-05 05:31:14 +00:00
Dan Gohman
c1dee225d0
Ignore IMPLICIT_DEF instructions when computing physreg liveness.
...
While they appear to provide a normal clobbering def, they don't
in the case of the awkward IMPLICIT_DEF+INSERT_SUBREG idiom. It
would be good to change INSERT_SUBREG; until then, this change
allows post-regalloc scheduling to cope in a mildly conservative
way.
llvm-svn: 60583
2008-12-05 05:30:02 +00:00
Owen Anderson
0bcbe8f6a8
Factor out some common code.
...
llvm-svn: 60553
2008-12-04 21:20:30 +00:00
Duncan Sands
471a654711
When allocating a stack temporary, use the correct
...
number of bytes for types such as i1 which are not
a multiple of 8 bits in length.
llvm-svn: 60543
2008-12-04 18:08:40 +00:00
Dan Gohman
44f57df254
Use register names instead of numbers in debug output.
...
llvm-svn: 60525
2008-12-04 02:15:26 +00:00
Dan Gohman
30cad9c192
Make debug output more informative.
...
llvm-svn: 60524
2008-12-04 02:14:57 +00:00
Dan Gohman
3aab10b932
Add minimal support for disambiguating memory references. Currently
...
the main thing this covers is spills to distinct spill slots.
llvm-svn: 60517
2008-12-04 01:35:46 +00:00
Dan Gohman
84efaf6a63
Rewrite the liveness bookkeeping code to fix a bunch of
...
issues with subreg operands and tied operands.
llvm-svn: 60510
2008-12-03 23:07:27 +00:00
Dan Gohman
ee1cd1781a
Have PseudoSourceValue override Value::dump, so that it works
...
on PseudoSourceValue values. This also fixes a FIXME in
lib/VMCode/AsmWriter.cpp.
llvm-svn: 60507
2008-12-03 21:37:21 +00:00
Dan Gohman
0c91a5f56c
Fix an inconsistency in a comment.
...
llvm-svn: 60500
2008-12-03 19:38:38 +00:00
Dan Gohman
434a3ca8e9
Don't charge the full latency for anti and output dependencies. This is
...
an area where eventually it would be good to use target-dependent
information.
llvm-svn: 60498
2008-12-03 19:37:34 +00:00
Dan Gohman
444baea236
When looking for anti-dependences on the critical path, don't bother
...
examining non-anti-dependence edges.
llvm-svn: 60496
2008-12-03 19:32:26 +00:00
Dan Gohman
1a32dda4aa
Add a comment about callee-saved registers.
...
llvm-svn: 60495
2008-12-03 19:30:13 +00:00
Dan Gohman
3f86b51333
Split foldMemoryOperand into public non-virtual and protected virtual
...
parts, and add target-independent code to add/preserve
MachineMemOperands.
llvm-svn: 60488
2008-12-03 18:43:12 +00:00
Dan Gohman
69cc2cbbff
Rename isSimpleLoad to canFoldAsLoad, to better reflect its meaning.
...
llvm-svn: 60487
2008-12-03 18:15:48 +00:00
Duncan Sands
f52e518d05
Only check that the result of the mapping was not
...
a new node if the node was actually remapped.
llvm-svn: 60482
2008-12-03 12:36:16 +00:00
Rafael Espindola
cda011b5ad
Fix bug 3140.
...
Print a single parameter .file directive if we have an ELF target.
llvm-svn: 60480
2008-12-03 11:01:37 +00:00
Dan Gohman
ae3ba45eb2
Add a sanity-check to tablegen to catch the case where isSimpleLoad
...
is set but mayLoad is not set. Fix all the problems this turned up.
Change code to not use isSimpleLoad instead of mayLoad unless it
really wants isSimpleLoad.
llvm-svn: 60459
2008-12-03 02:30:17 +00:00
Evan Cheng
e62150cae4
Remove a (what appears to be) overly strict assertion. Here is what happened:
...
1. ppcf128 select is expanded to f64 select's.
2. f64 select operand 0 is an i1 truncate, it's promoted to i32 zero_extend.
3. f64 select is updated. It's changed back to a "NewNode" and being re-analyzed.
4. f64 select operands are being processed. Operand 0 is a "NewNode". It's being expunged out of ReplacedValues map.
5. ExpungeNode tries to remap f64 select and notice it's a "NewNode" and assert.
Duncan, please take a look. Thanks.
llvm-svn: 60443
2008-12-02 21:57:09 +00:00
Scott Michel
9b0b28e021
Non-functional change: make custom lowering for truncate stylistically
...
consistent with the way it's generally done in other places.
llvm-svn: 60439
2008-12-02 19:55:08 +00:00
Dan Gohman
7e9daef644
Fix a typo in a comment.
...
llvm-svn: 60434
2008-12-02 19:27:20 +00:00
Owen Anderson
ecd5b5f2b2
Add support for folding spills into preceding defs when doing pre-alloc splitting.
...
llvm-svn: 60433
2008-12-02 18:53:47 +00:00
Dale Johannesen
54bdec238a
One more transformation.
...
llvm-svn: 60432
2008-12-02 18:40:40 +00:00
Tilmann Scheller
318ccb0e62
make it possible to custom lower TRUNCATE (needed for the CellSPU target)
...
llvm-svn: 60409
2008-12-02 12:12:25 +00:00
Mon P Wang
6e1c6ad127
Removed some unnecessary code in widening.
...
llvm-svn: 60406
2008-12-02 07:35:08 +00:00
Evan Cheng
1718fd4375
Fix PR3124: overly strict assert.
...
llvm-svn: 60392
2008-12-02 02:15:36 +00:00
Dale Johannesen
8c76670b5a
Add a few more transformations.
...
llvm-svn: 60391
2008-12-02 01:30:54 +00:00
Bill Wendling
2d59863d06
Expand getVTList, getNodeValueTypes, and SelectNodeTo to handle more value types.
...
llvm-svn: 60381
2008-12-01 23:28:22 +00:00
Duncan Sands
3d960941b1
There are no longer any places that require a
...
MERGE_VALUES node with only one operand, so get
rid of special code that only existed to handle
that possibility.
llvm-svn: 60349
2008-12-01 11:41:29 +00:00
Duncan Sands
6ed40141f7
Change the interface to the type legalization method
...
ReplaceNodeResults: rather than returning a node which
must have the same number of results as the original
node (which means mucking around with MERGE_VALUES,
and which is also easy to get wrong since SelectionDAG
folding may mean you don't get the node you expect),
return the results in a vector.
llvm-svn: 60348
2008-12-01 11:39:25 +00:00
Eli Friedman
c8228d263b
Followup to r60283: optimize arbitrary width signed divisions as well
...
as unsigned divisions. Same caveats as before.
llvm-svn: 60284
2008-11-30 06:35:39 +00:00
Eli Friedman
1b7fc154a5
Fix for PR2164: allow transforming arbitrary-width unsigned divides into
...
multiplies.
Some more cleverness would be nice, though. It would be nice if we
could do this transformation on illegal types. Also, we would
prefer a narrower constant when possible so that we can use a narrower
multiply, which can be cheaper.
llvm-svn: 60283
2008-11-30 06:02:26 +00:00
Eli Friedman
bd0f57821a
APIntify a test which is potentially unsafe otherwise, and fix the
...
nearby FIXME.
I'm not sure what the right way to fix the Cell test was; if the
approach I used isn't okay, please let me know.
llvm-svn: 60277
2008-11-30 04:59:26 +00:00
Nick Lewycky
2c96bdd8d6
Silence a warning.
...
Despite changing the order of evaluation, this doesn't actually change the
meaning of the statement.
llvm-svn: 60177
2008-11-27 17:29:52 +00:00
Sanjiv Gupta
7ae1a84465
Removing redundant semicolons. No functionality change.
...
llvm-svn: 60149
2008-11-27 05:58:04 +00:00
Evan Cheng
3761143755
Avoid inserting noop's in the middle of a loop.
...
llvm-svn: 60141
2008-11-27 01:16:00 +00:00
Dale Johannesen
73bc0ba4c9
Add a missing case in visitADD.
...
llvm-svn: 60137
2008-11-27 00:43:21 +00:00
Sanjiv Gupta
80810f8c6b
Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.
...
llvm-svn: 60102
2008-11-26 11:19:00 +00:00
Dan Gohman
3336b1f06b
LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
...
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.
llvm-svn: 60092
2008-11-26 05:50:31 +00:00
Bill Wendling
b4ff5322c1
A simplification for checking whether the signs of the operands and sum differ. Thanks, Duncan.
...
llvm-svn: 60043
2008-11-25 19:40:17 +00:00
Dan Gohman
bb1298e6d4
Suppress warnings.
...
llvm-svn: 60041
2008-11-25 18:53:54 +00:00
Bill Wendling
bf592fccd4
Now with the correct type for the 0.
...
llvm-svn: 60016
2008-11-25 08:19:22 +00:00
Bill Wendling
d06c625b95
Get rid of unused variable.
...
llvm-svn: 60015
2008-11-25 08:13:20 +00:00
Bill Wendling
4498b47677
Hacker's Delight says, "Signed integer overflow of addition occurs if and only
...
if the operands have the same sign and the sum has sign opposite to that of the
operands."
llvm-svn: 60014
2008-11-25 08:12:19 +00:00
Dan Gohman
ad2134d45d
Initial support for anti-dependence breaking. Currently this code does not
...
introduce any new spilling; it just uses unused registers.
Refactor the SUnit topological sort code out of the RRList scheduler and
make use of it to help with the post-pass scheduler.
llvm-svn: 59999
2008-11-25 00:52:40 +00:00
Bill Wendling
66835479d7
- Make lowering of "add with overflow" customizable by back-ends.
...
- Mark "add with overflow" as having a custom lowering for X86. Give it a null
lowering representation for now.
llvm-svn: 59971
2008-11-24 19:21:46 +00:00
Dan Gohman
5cc12a8e31
Check in the rest of this change. The isAntiDep flag needs to be passed
...
to removePred because an SUnit can both data-depend and anti-depend
on the same SUnit.
llvm-svn: 59969
2008-11-24 17:33:52 +00:00
Dan Gohman
d2b10368ed
Pass the isAntiDep argument.
...
llvm-svn: 59968
2008-11-24 17:24:27 +00:00
Dan Gohman
11e4be3717
Run post-RA scheduling after branch folding, as it tends to
...
obscure tail-merging opportunities.
llvm-svn: 59967
2008-11-24 17:22:52 +00:00
Matthijs Kooijman
1dc8363d95
Minor fix debug for register allocation debug output.
...
llvm-svn: 59961
2008-11-24 16:01:21 +00:00
Duncan Sands
dc2dac181a
If the type legalizer actually legalized anything
...
(this doesn't happen that often, since most code
does not use illegal types) then follow it by a
DAG combiner run that is allowed to generate
illegal operations but not illegal types. I didn't
modify the target combiner code to distinguish like
this between illegal operations and illegal types,
so it will not produce illegal operations as well
as not producing illegal types.
llvm-svn: 59960
2008-11-24 14:53:14 +00:00