Dan Gohman
3570f81b1e
Move PHIElimination's SplitCriticalEdge for MachineBasicBlocks out
...
into a utility routine, teach it how to update MachineLoopInfo, and
make use of it in MachineLICM to split critical edges on demand.
llvm-svn: 106555
2010-06-22 17:25:57 +00:00
Fariborz Jahanian
a9f90275cc
Trying to make BuildBot happy again (related to PR7431).
...
llvm-svn: 106553
2010-06-22 17:08:32 +00:00
Argyrios Kyrtzidis
6e57c35513
Read/write CXXDeleteExpr from/to PCH.
...
llvm-svn: 106552
2010-06-22 17:07:59 +00:00
Douglas Gregor
db48cf3c31
Don't allow vector conversions to sneak in under the guise of
...
floating-point conversions or floating-integral conversions. We
really, really, really need to make isFloatingType() and friends not
apply to vector types.
llvm-svn: 106551
2010-06-22 16:52:27 +00:00
Fariborz Jahanian
7966aff294
Fixes a problem in generation of meta-data for
...
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).
llvm-svn: 106550
2010-06-22 16:33:55 +00:00
Anders Carlsson
ea836bc41c
Switch over to the new caching version of getMangledName.
...
llvm-svn: 106549
2010-06-22 16:16:50 +00:00
Jakob Stoklund Olesen
9c47dac677
Remove the SimpleJoin optimization from SimpleRegisterCoalescing.
...
Measurements show that it does not speed up coalescing, so there is no reason
the keep the added complexity around.
Also clean out some unused methods and static functions.
llvm-svn: 106548
2010-06-22 16:13:57 +00:00
Anders Carlsson
2e2f4d2e6d
Add a new variant of getMangledName that caches the mangling for decls.
...
llvm-svn: 106547
2010-06-22 16:05:32 +00:00
Anders Carlsson
16d9f1788e
Add GlobalDecl::getCanonicalDecl.
...
llvm-svn: 106546
2010-06-22 16:00:14 +00:00
Benjamin Kramer
eb9165c08f
Reduce code duplication.
...
This also moves strlen out of the mutex scope.
llvm-svn: 106545
2010-06-22 15:28:34 +00:00
Benjamin Kramer
53a61dc531
Ensure GetDemangledName's thread safety by making the demangle buffer thread specific.
...
I'm not sure when multiple threads enter this method but a race-condition
causing a crash in malloc can be reproduced with this little script:
echo file $(which lldb) > cmd
echo "run\nbreak set -n main\nrun\nexit" >> cmd
lldb -s cmd
It may need a few runs before it crashes though.
llvm-svn: 106544
2010-06-22 15:28:29 +00:00
Dan Gohman
3986af0c5a
Split out the code for finding a unique loop predecessor from
...
getLoopPreheader into a separate function, for clients which don't
require a proper preheader.
llvm-svn: 106543
2010-06-22 15:25:42 +00:00
Dan Gohman
d2d1ae105d
Use pre-increment instead of post-increment when the result is not used.
...
llvm-svn: 106542
2010-06-22 15:08:57 +00:00
Douglas Gregor
a46d66122f
When we ask for the enumerators of an EnumDecl, make sure we get them even if we have a EnumDecl that is not the definition of the enumeration
...
llvm-svn: 106541
2010-06-22 14:45:56 +00:00
Douglas Gregor
c9ea2d5a67
In C++, allow a declaration of an enum to follow a definition of that
...
enum as a GNU extension.
llvm-svn: 106540
2010-06-22 14:26:35 +00:00
Dan Gohman
5666ad7381
Add a comment explaining a non-obvious API.
...
llvm-svn: 106539
2010-06-22 13:57:08 +00:00
Dan Gohman
2ceaa71bdb
Add an explicit keyword.
...
llvm-svn: 106538
2010-06-22 13:53:29 +00:00
Dan Gohman
f820bd327d
Allow "exhaustive" trip count evaluation on phi nodes with all
...
constant operands.
llvm-svn: 106537
2010-06-22 13:15:46 +00:00
Argyrios Kyrtzidis
75000b6814
Fix PR7180.
...
For
void f( a:🅱️ :c );
we would cache the tokens "a:🅱️ :" but then we would try to annotate them using the range "a::".
Before annotating them with the (invalid) C++ scope spec, set it to the range of "a:🅱️ :".
llvm-svn: 106536
2010-06-22 11:30:04 +00:00
Benjamin Kramer
104819c6eb
Move trivial parts of UserID into the header.
...
llvm-svn: 106535
2010-06-22 10:44:12 +00:00
Argyrios Kyrtzidis
69da4a8f07
Support emitting/reading function templates to/from PCH.
...
llvm-svn: 106534
2010-06-22 09:55:07 +00:00
Argyrios Kyrtzidis
ae85e2414c
-Introduce PCHReader::ReadTemplateArgumentLoc()
...
-Introduce PCHWriter::AddTemplateArgumentLocInfo()
-Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument
and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo().
llvm-svn: 106533
2010-06-22 09:54:59 +00:00
Argyrios Kyrtzidis
cb6f346873
Make it easier to read/write the template part of FunctionDecl.
...
Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.
llvm-svn: 106532
2010-06-22 09:54:51 +00:00
Benjamin Kramer
1e63c74f60
Silence warning about C++-style comments.
...
llvm-svn: 106531
2010-06-22 09:29:44 +00:00
Zhongxing Xu
4505747979
Add a bunch of stream APIs to SteamChecker.
...
llvm-svn: 106530
2010-06-22 07:50:21 +00:00
Devang Patel
f040dec68a
Revert 106528. It is causing self host failures.
...
llvm-svn: 106529
2010-06-22 06:14:09 +00:00
Devang Patel
b195eb4acf
Do not rely on DenseMap slot which can be easily invalidated when DenseMap grows.
...
llvm-svn: 106528
2010-06-22 05:16:56 +00:00
Douglas Gregor
ef4a2a2b54
Apply array-to-pointer decay when instantiating a MemberExpr. Fixes
...
PR7405, patch by Kyle Lippincott!
llvm-svn: 106523
2010-06-22 02:41:05 +00:00
Douglas Gregor
de049cdbe6
Attempt to fix test
...
llvm-svn: 106522
2010-06-22 02:17:07 +00:00
Bob Wilson
6c1fc79cab
Revert my change to clone named metadata. Buildbots are complaining.
...
--- Reverse-merging r106508 into '.':
U lib/Transforms/Utils/CloneModule.cpp
llvm-svn: 106521
2010-06-22 02:08:51 +00:00
Dan Gohman
2370e2fe0f
When unfolding a load, avoid assuming which instruction that
...
kill and dead flags will end up on.
llvm-svn: 106520
2010-06-22 02:07:21 +00:00
Devang Patel
b6e058da18
Use single interface, using twine, to get named metadata.
...
getNamedMetadata().
llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Evan Cheng
37bb617f8a
Tail merging pass shall not break up IT blocks. rdar://8115404
...
llvm-svn: 106517
2010-06-22 01:18:16 +00:00
Devang Patel
cbc6fd8493
Discard special LLVM prefix from linkage name.
...
llvm-svn: 106516
2010-06-22 01:06:05 +00:00
Devang Patel
ad51735794
Do not rely on Twine temporaries to survive.
...
llvm-svn: 106515
2010-06-22 01:01:58 +00:00
Chris Lattner
60bb7c42a7
make sure to initialize indent_level
...
llvm-svn: 106513
2010-06-22 00:40:26 +00:00
Dan Gohman
851e478e6b
Fix the new load-unfolding code to update LiveVariable's dead flags,
...
in addition to the kill flags.
llvm-svn: 106512
2010-06-22 00:32:04 +00:00
Fariborz Jahanian
469b200321
Per Chris's comment, remove another static (this one
...
is a static comparator operator).
llvm-svn: 106511
2010-06-22 00:23:08 +00:00
Johnny Chen
7c3f7fee41
Left a debug statement in the previous checkin.
...
llvm-svn: 106510
2010-06-22 00:13:20 +00:00
Johnny Chen
a02199f5e7
Remove stale reference to the lldb path component.
...
llvm-svn: 106509
2010-06-22 00:11:26 +00:00
Bob Wilson
5f9575c1cd
Include named metadata when cloning a module.
...
llvm-svn: 106508
2010-06-22 00:11:03 +00:00
Chris Lattner
3c77a355e0
implement support for -finstrument-functions, patch by Nelson
...
Elhage!
llvm-svn: 106507
2010-06-22 00:03:40 +00:00
Eric Christopher
b2c4a99d52
Fix typo.
...
llvm-svn: 106505
2010-06-21 23:49:08 +00:00
Douglas Gregor
27b98eae80
Alter the internal representation of the condition variable in
...
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.
In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.
Fixes the remainder of <rdar://problem/8104754>.
llvm-svn: 106504
2010-06-21 23:44:13 +00:00
Fariborz Jahanian
c9fec975e6
Avoid using a local static for providing lexical
...
order of priorotized global object initializations.
llvm-svn: 106503
2010-06-21 23:31:29 +00:00
Chris Lattner
64960f55fe
add some support for blockaddress. This isn't really enough to be useful,
...
but it will cover uses of blockaddress that are actually in a function.
llvm-svn: 106502
2010-06-21 23:19:36 +00:00
Chris Lattner
bb45b964f8
eliminate a mutable global variable, use raw_ostream::indent instead of
...
rolling our own.
llvm-svn: 106501
2010-06-21 23:14:47 +00:00
Chris Lattner
a0b8c90870
un-indent a huge amount of code out of an anonymous namespace.
...
llvm-svn: 106500
2010-06-21 23:12:56 +00:00
Bruno Cardoso Lopes
b7dadb0e95
revert r106482
...
llvm-svn: 106499
2010-06-21 22:59:03 +00:00
Chris Lattner
26d7950f8f
fix several bugs in the tutorial, patch by Kevin Kelley!
...
llvm-svn: 106498
2010-06-21 22:51:14 +00:00