David Greene
753ed8fd9c
Implement multiclass inheritance.
...
llvm-svn: 69810
2009-04-22 16:42:54 +00:00
Dan Gohman
79af854f55
Simplify trivial cast-of-cast SCEVs.
...
llvm-svn: 69809
2009-04-22 16:20:48 +00:00
Dan Gohman
54fd2869a3
SCEVExpander's InsertCastOfTo knows how to move existing cast
...
instructions in order to avoid inserting new ones. However, if
the cast instruction is the SCEVExpander's InsertPt, this
causes subsequently emitted instructions to be inserted near
the cast, and not at the location of the original insert point.
Fix this by adjusting the insert point in such cases.
This fixes PR4009.
llvm-svn: 69808
2009-04-22 16:11:16 +00:00
Dan Gohman
9dd9a45e12
Use BasicBlock::iterator instead of Instruction* for insert points,
...
to better handle inserting instructions at the end of a block.
llvm-svn: 69807
2009-04-22 16:05:50 +00:00
Dan Gohman
87d138c3b9
Make SCEVExpanders private methods private, instead of protected.
...
llvm-svn: 69806
2009-04-22 16:00:36 +00:00
Dan Gohman
956ae9dc15
Use CloneModule's ValueMap in more places, instead of looking
...
up functions by name.
llvm-svn: 69805
2009-04-22 15:57:18 +00:00
Dan Gohman
a4fea5b227
ISD::ADD_PARTS is gone; use ISD::SMUL_LOHI as an example instead.
...
llvm-svn: 69804
2009-04-22 15:55:31 +00:00
Sanjiv Gupta
107b2818ce
Make the function begin label start after ther data pointer.
...
The address of data frame for function can be obtained by subtracting 2 from the function begin label.
llvm-svn: 69801
2009-04-22 12:02:36 +00:00
Duncan Sands
ab4c600e8b
These tests are x86 specific.
...
llvm-svn: 69798
2009-04-22 10:39:51 +00:00
Owen Anderson
6cbf5bb9bb
Real fix for PR3549, by using caching for predecessor counts in addition to the predecessors themselves. This halves the time
...
to optimize the testcase, beyond what my previous patch did.
llvm-svn: 69792
2009-04-22 08:50:12 +00:00
Owen Anderson
9ea578ea70
Add caching of predecessor counts as well as predecessors themselves.
...
llvm-svn: 69791
2009-04-22 08:46:33 +00:00
Owen Anderson
bb754826c9
Use PredIteratorCache in LCSSA, which gives a 37% overall speedup on the testcase from PR3549. More improvements to come.
...
llvm-svn: 69788
2009-04-22 08:09:13 +00:00
Owen Anderson
ecf6910f41
Fix for PR3946, in which SmallVector could behave strangely in corner cases.
...
Patch by Peter Johnson.
llvm-svn: 69785
2009-04-22 07:16:54 +00:00
Chris Lattner
58be2d4413
use predicate instead of hand-rolled loop
...
llvm-svn: 69752
2009-04-21 23:37:18 +00:00
Dan Gohman
c8e236278e
De-pImpl-ify ScalarEvolution. The pImpl pattern doesn't provide much
...
practical benefit in the case of ScalarEvolution, and it's otherwise
a nuisance.
llvm-svn: 69749
2009-04-21 23:15:49 +00:00
Evan Cheng
1a99a5f501
It has finally happened. Spiller is now using live interval info.
...
This fixes a very subtle bug. vr defined by an implicit_def is allowed overlap with any register since it doesn't actually modify anything. However, if it's used as a two-address use, its live range can be extended and it can be spilled. The spiller must take care not to emit a reload for the vn number that's defined by the implicit_def. This is both a correctness and performance issue.
llvm-svn: 69743
2009-04-21 22:46:52 +00:00
Dan Gohman
e14efcc9f4
When turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of the
...
type to truncate to should be the number of bits of the value that are
preserved, not the number that are clobbered with sign-extension.
This fixes regressions in ldecod.
llvm-svn: 69704
2009-04-21 20:18:36 +00:00
Mikhail Glushenkov
2c332fec97
Support --with-llvmgccdir and friends in llvmc, take 2.
...
Should now work when building with objdir != srcdir and when llvm-gcc is not
available.
Thanks to Duncan Sands for testing and advice!
llvm-svn: 69700
2009-04-21 19:46:10 +00:00
Devang Patel
55f84db7ea
Test case for revision 69683.
...
llvm-svn: 69684
2009-04-21 17:21:01 +00:00
Chris Lattner
69223bb7f5
fix a crash on a pointless but valid zero-length memset, rdar://6808691
...
llvm-svn: 69680
2009-04-21 16:52:12 +00:00
Anton Korobeynikov
f7d0c1a5e6
Silence warnings.
...
Patch by Jay Foad!
llvm-svn: 69679
2009-04-21 16:04:56 +00:00
Anton Korobeynikov
5a4b52dc0c
Drop obsolete reference to __eprintf.
...
Patch by Jay Foad!
llvm-svn: 69678
2009-04-21 16:04:41 +00:00
Anton Korobeynikov
c6cd4b5016
'The "or die" is intended to catch the case where nm returned a
...
non-zero exit status, so nm will already have printed some error
messages.'
Patch by Jay Foad!
llvm-svn: 69677
2009-04-21 16:04:14 +00:00
Duncan Sands
7ce5cc6bd1
Get rid of what looks like a copy-and-pasted typo.
...
Spotted by gcc-4.5.
llvm-svn: 69673
2009-04-21 09:44:39 +00:00
Rafael Espindola
47ed1f5293
TLS_addr64 and TLS_addr32 define RDI and EAX. They don't use them.
...
This fixes PR4002.
llvm-svn: 69672
2009-04-21 08:22:09 +00:00
Sanjiv Gupta
3e3ef7c4d9
Handle direct aggregate type arguments.
...
llvm-svn: 69665
2009-04-21 05:54:51 +00:00
Dan Gohman
0ec0537403
Teach ScalarEvolution how to recognize zext-inreg and sext-inreg,
...
as they appear in LLVM IR. This isn't particularly interesting
on its own; this is just setting up some infrastructure.
llvm-svn: 69655
2009-04-21 02:26:00 +00:00
Dan Gohman
c4938497b3
This FIXME is fixed, now that SCEV understands pointers.
...
llvm-svn: 69651
2009-04-21 01:41:18 +00:00
Dan Gohman
4860db61be
Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,
...
and SCEVSignExtendExpr.
llvm-svn: 69649
2009-04-21 01:25:57 +00:00
Dan Gohman
49e062fcc1
Usage getAnalysisToUpdate for TargetData, per PR760.
...
llvm-svn: 69645
2009-04-21 01:11:19 +00:00
Dan Gohman
b397e1a7a2
Introduce encapsulation for ScalarEvolution's TargetData object, and refactor
...
the code to minimize dependencies on TargetData.
llvm-svn: 69644
2009-04-21 01:07:12 +00:00
Dan Gohman
413e91f440
Move some assertion checks so they can do more complete checking.
...
llvm-svn: 69643
2009-04-21 00:55:22 +00:00
Dan Gohman
e20f824565
Convert ScalarEvolution to use raw_ostream instead of OStream.
...
llvm-svn: 69640
2009-04-21 00:47:46 +00:00
Devang Patel
7f413cb05f
Fix Visual Studio 2008 build failure.
...
Patch by Marius Wachtler
llvm-svn: 69637
2009-04-21 00:08:56 +00:00
Dan Gohman
1addf64735
Make X86's copyRegToReg able to handle copies to and from subclasses.
...
This makes the extra copyRegToReg calls in ScheduleDAGSDNodesEmit.cpp
unnecessary. Derived from a patch by Jakob Stoklund Olesen.
llvm-svn: 69635
2009-04-20 22:54:34 +00:00
Dan Gohman
e014b69919
Simplify this code. getConstant knows how to make
...
broadcasted vector constants.
llvm-svn: 69634
2009-04-20 22:51:43 +00:00
Evan Cheng
5770950dbb
No, we are not avoiding -O3, just -fstrict-aliasing.
...
llvm-svn: 69633
2009-04-20 22:49:59 +00:00
Dale Johannesen
1238220473
Adjust loop size estimate for full unrolling;
...
GEP's don't usually become instructions.
llvm-svn: 69631
2009-04-20 22:19:33 +00:00
Evan Cheng
40c52322a7
One Mac OS X, just build with -O3 but without -fstrict-aliasing (which is kinda broken).
...
llvm-svn: 69630
2009-04-20 22:16:40 +00:00
Daniel Dunbar
3222b9be04
Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:
...
clang: error: unable to make temporary file: /etc/cc: can't make
unique filename: Permission denied
instead of
clang: error: unable to make temporary file: /etc/cc: can't make
unique filenamePermission denied
for example.
Also, audited the uses of MakeErrMsg to make the prefix strings
consistent (not end with newline/punctuation/space/": ").
llvm-svn: 69626
2009-04-20 20:50:13 +00:00
Daniel Dunbar
2c441c6afe
Remove unused variable.
...
llvm-svn: 69624
2009-04-20 20:34:38 +00:00
Bob Wilson
f8b85477ae
Move duplicated AddLiveIn function from X86 and ARM backends to be a method
...
in the MachineFunction class, renaming it to addLiveIn for consistency with
the same method in MachineBasicBlock. Thanks for Anton for suggesting this.
llvm-svn: 69615
2009-04-20 18:36:57 +00:00
Devang Patel
958d5eb032
Match C backend only if it explicitly requested.
...
llvm-svn: 69613
2009-04-20 18:07:22 +00:00
Tanya Lattner
a1eeaff125
Remove clang since its conditionally there already.
...
llvm-svn: 69610
2009-04-20 17:48:16 +00:00
Bob Wilson
da188ebbbd
Revise my previous change 68996 as suggested by Duncan.
...
llvm-svn: 69607
2009-04-20 17:27:09 +00:00
Evan Cheng
5dd2e29b67
- Remove an arbitrary spill weight tweak that should not have been there.
...
- Find more reloads from SS.
llvm-svn: 69606
2009-04-20 17:23:48 +00:00
Sanjiv Gupta
0fcc019d36
Emit the auto variables of a function into a different section than parameters.
...
llvm-svn: 69605
2009-04-20 16:59:35 +00:00
Dan Gohman
f7db87f2dc
It's not necessary for PrintModulePass to flush the output streams
...
now that errs() is properly non-buffered.
llvm-svn: 69602
2009-04-20 16:26:25 +00:00
Dan Gohman
59ceb59f5b
Use .empty() instead of .size().
...
llvm-svn: 69599
2009-04-20 16:19:02 +00:00
Dan Gohman
6c7a485c19
Don't discard an AssemblyAnnotationWriter when writing GlobalValues,
...
which include Functions, where it can be quite useful to use an
AssemblyAnnotationWriter.
llvm-svn: 69598
2009-04-20 16:10:33 +00:00