Wesley Peck
eef03fb444
Make MCJIT work with CMake.
...
llvm-svn: 119589
2010-11-17 23:35:07 +00:00
Jim Grosbach
56f471726c
Clean up LEApcrel instuction(s) a bit. It's not really a Pseudo, so don't mark
...
it as such. Add some encoding information.
llvm-svn: 119588
2010-11-17 23:33:14 +00:00
Dan Gohman
7e6b393e66
Factor out the code for purging a SCEV from all the various memoization maps.
...
Some of these maps may merge in the future, but for now it's convenient to have
a utility function for them.
llvm-svn: 119587
2010-11-17 23:28:48 +00:00
Ted Kremenek
7df92ae92b
Make definition of CXTranslationUnitImpl private
...
to libclang.
llvm-svn: 119585
2010-11-17 23:24:11 +00:00
Dan Gohman
7ee1bbb76c
Merge the implementations of isLoopInvariant and hasComputableLoopEvolution, and
...
memoize the results. This improves compile time in code which highly complex
expressions which get queried many times.
llvm-svn: 119584
2010-11-17 23:21:44 +00:00
Argyrios Kyrtzidis
af84ec0a96
Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value
...
or return by-value any POD that is larger than some threshold (default is 64 bytes).
Implements rdar://8548050.
llvm-svn: 119583
2010-11-17 23:11:54 +00:00
Sean Callanan
afe16a71f7
Added support for constant strings of the form @"this-is-a-string".
...
They are replaced with calls to the CoreFoundation function
CFStringCreateWithBytes() by a portion of the IRForTarget pass.
llvm-svn: 119582
2010-11-17 23:00:36 +00:00
Sean Callanan
ac6429fc9a
Whitespace fix.
...
llvm-svn: 119581
2010-11-17 23:00:07 +00:00
Wesley Peck
307e4688c5
Now that the MBlaze backend is in its own directory, split the test cases into multiple files for different types of instructions.
...
llvm-svn: 119580
2010-11-17 22:54:43 +00:00
Dan Gohman
534749bf70
Make SCEV::getType() and SCEV::print non-virtual. Move SCEV::hasOperand
...
to ScalarEvolution. Delete SCEV::~SCEV. SCEV is no longer virtual.
llvm-svn: 119578
2010-11-17 22:27:42 +00:00
Rafael Espindola
d47ac23154
Implement -pie.
...
llvm-svn: 119577
2010-11-17 22:26:15 +00:00
Owen Anderson
55425e7f78
Second attempt at correct encodings for Thumb2 bitfield instructions.
...
llvm-svn: 119575
2010-11-17 22:16:31 +00:00
Rafael Espindola
cfaaddaee0
Don't warn about
...
clang -w -c foo.s
Helps with the gdb testsuite.
llvm-svn: 119574
2010-11-17 22:13:25 +00:00
Jim Grosbach
4ded8f264a
Fix comment typo.
...
llvm-svn: 119573
2010-11-17 21:57:51 +00:00
Dale Johannesen
0659c8f157
These tests are looking for library function names that
...
appear to differ on Linux. Try to make them pass on Linux.
Would be good for a Linux person to review this.
llvm-svn: 119572
2010-11-17 21:57:32 +00:00
Howard Hinnant
d09f711dc2
LWG 1325
...
llvm-svn: 119571
2010-11-17 21:53:14 +00:00
Dan Gohman
20d9ce21ef
Move SCEV::dominates and properlyDominates to ScalarEvolution.
...
llvm-svn: 119570
2010-11-17 21:41:58 +00:00
Douglas Gregor
b4a7c0385d
Do not produce "purely informative" code completion results for
...
Objective-C message sends, which have only whitespace in their
TypedText chunk. Such results have no purpose.
llvm-svn: 119569
2010-11-17 21:36:08 +00:00
Marcin Swiderski
af56739355
In EvalArguments allow for evaluation of first argument always as a lvalue. Will be used for CXXOperatorCallExpr that represents method call.
...
llvm-svn: 119567
2010-11-17 21:27:36 +00:00
Bob Wilson
881b45ccdf
Change ARMGlobalMerge to keep BSS globals in separate pools.
...
This completes the fixes for Radar 8673120.
llvm-svn: 119566
2010-11-17 21:25:39 +00:00
Bob Wilson
4c8ab19c22
Fix ARMGlobalMerge pass to check if globals are entirely within range.
...
It is generally not sufficient to check if the starting offset is in range
of the maximum offset that can be efficiently used for the target.
llvm-svn: 119565
2010-11-17 21:25:36 +00:00
Bob Wilson
59182fb4b5
Change the symbol for merged globals from "merged" to "_MergedGlobals".
...
This makes it more clear that the symbol is an internal, compiler-generated
name and gives a little more description about its contents.
llvm-svn: 119564
2010-11-17 21:25:33 +00:00
Bob Wilson
f796d4b469
Fix the ARMGlobalMerge pass to look at variable sizes instead of pointer sizes.
...
It was mistakenly looking at the pointer type when checking for the size of
global variables. This is a partial fix for Radar 8673120.
llvm-svn: 119563
2010-11-17 21:25:27 +00:00
Dan Gohman
afd6db9932
Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be member
...
functions of ScalarEvolution, in preparation for memoization and
other optimizations.
llvm-svn: 119562
2010-11-17 21:23:15 +00:00
Howard Hinnant
5ba1459c4c
LWG 1323
...
llvm-svn: 119560
2010-11-17 21:11:40 +00:00
Jim Grosbach
08c562bba6
Make the ARM BR_JTadd instruction an explicit pseudo and lower it properly
...
in the MC lowering process.
llvm-svn: 119559
2010-11-17 21:05:55 +00:00
Evan Cheng
39c81c0a55
Avoid isel movcc of large immediates when the large immediate is available in a register. These immediates aren't free.
...
llvm-svn: 119558
2010-11-17 20:56:30 +00:00
Dan Gohman
1ee6d24072
Reference ScalarEvolution by name rather than directly in LICM,
...
to avoid an unneeded dependence.
llvm-svn: 119557
2010-11-17 20:50:07 +00:00
Duncan Sands
39d77131a1
Before replacing a phi node with a different value, it
...
needs to be checked that this won't break LCSSA form.
Change the existing checking method to a more direct one:
rather than seeing if all predecessors belong to the loop,
check that the replacing value is either not in any loop or
is in a loop that contains the phi node.
llvm-svn: 119556
2010-11-17 20:49:12 +00:00
Owen Anderson
6c37ceb182
Revert r119551, which broke buildbots.
...
llvm-svn: 119555
2010-11-17 20:48:51 +00:00
Dan Gohman
d3a32ae4c8
Verify SCEVAddRecExpr's invariant in ScalarEvolution::getAddRecExpr
...
instead of in SCEVAddRecExpr's constructor, in preparation for an
upcoming change.
llvm-svn: 119554
2010-11-17 20:48:38 +00:00
Jim Ingham
978e071f16
Add a missing newline to the ThreadPlanAssemblyTracer output.
...
llvm-svn: 119553
2010-11-17 20:40:29 +00:00
Rafael Espindola
f92614c578
Don't warn about -w not being used in a link. Necessary to get sane
...
results in the gdb testsuite.
llvm-svn: 119552
2010-11-17 20:37:10 +00:00
Owen Anderson
7464116bde
Provide Thumb2 encodings for bitfield instructions.
...
llvm-svn: 119551
2010-11-17 20:35:29 +00:00
Dan Gohman
ed75631743
Fix ScalarEvolution's range memoization to avoid using a
...
default ctor with ConstantRange.
llvm-svn: 119550
2010-11-17 20:23:08 +00:00
Jim Ingham
a80ef35902
Add a ThreadPlanAssemblyTracer that takes just a thread (since that's how we call it from ThreadPlanBase...)
...
llvm-svn: 119549
2010-11-17 20:19:50 +00:00
Evan Cheng
7f8ab6ee8b
Remove ARM isel hacks that fold large immediates into a pair of add, sub, and,
...
and xor. The 32-bit move immediates can be hoisted out of loops by machine
LICM but the isel hacks were preventing them.
Instead, let peephole optimization pass recognize registers that are defined by
immediates and the ARM target hook will fold the immediates in.
Other changes include 1) do not fold and / xor into cmp to isel TST / TEQ
instructions if there are multiple uses. This happens when the 'and' is live
out, machine sink would have sinked the computation and that ends up pessimizing
code. The peephole pass would recognize situations where the 'and' can be
toggled to define CPSR and eliminate the comparison anyway.
2) Move peephole pass to after machine LICM, sink, and CSE to avoid blocking
important optimizations.
rdar://8663787, rdar://8241368
llvm-svn: 119548
2010-11-17 20:13:28 +00:00
Rafael Espindola
7a2cd8b540
make isVirtualSection a virtual method on MCSection. Chris' suggestion.
...
llvm-svn: 119547
2010-11-17 20:03:54 +00:00
Owen Anderson
bced7ae046
More miscellaneous Thumb2 encodings.
...
llvm-svn: 119546
2010-11-17 19:57:38 +00:00
Howard Hinnant
601afb30ec
LWG 1191
...
llvm-svn: 119545
2010-11-17 19:52:17 +00:00
Chris Lattner
eebbbeb917
add some justification for "using namespace llvm;"
...
llvm-svn: 119544
2010-11-17 19:47:20 +00:00
Fariborz Jahanian
8046af7d50
Warn if direct accessing synthesized ivar backing the property in
...
nonofragile-abi2. Fixes //rdar://8673791
llvm-svn: 119543
2010-11-17 19:41:23 +00:00
Jim Grosbach
d82684c7fc
Fix typo.
...
llvm-svn: 119542
2010-11-17 19:30:11 +00:00
Howard Hinnant
ef6168357a
LWG 1118
...
llvm-svn: 119541
2010-11-17 19:22:43 +00:00
Argyrios Kyrtzidis
56e879d1da
Don't emit warn_logical_and_in_logical_or for cases like "a && b || 0".
...
llvm-svn: 119540
2010-11-17 19:18:19 +00:00
Bill Wendling
11cc1761dd
Add missing opcodes now that this function's used in more than one place.
...
llvm-svn: 119539
2010-11-17 19:16:20 +00:00
Benjamin Kramer
07726c7d52
InstCombine: Add a missing irem identity (X % X -> 0).
...
llvm-svn: 119538
2010-11-17 19:11:46 +00:00
Argyrios Kyrtzidis
b94e5a33b3
Don't emit warn_logical_and_in_logical_or for macros. Fixes rdar://8678458
...
llvm-svn: 119537
2010-11-17 18:54:22 +00:00
Duncan Sands
c89ac07e7a
Move some those Xor simplifications which don't require creating new
...
instructions out of InstCombine and into InstructionSimplify. While
there, introduce an m_AllOnes pattern to simplify matching with integers
and vectors with all bits equal to one.
llvm-svn: 119536
2010-11-17 18:52:15 +00:00
Argyrios Kyrtzidis
14a96625b8
Don't warn for parentheses for the '&&' inside '||' for cases like:
...
assert(a || b && "bad");
since this is safe. This way we avoid a big source of such warnings which in this case are practically useless.
Note that we don't handle *all* cases where precedence wouldn't matter because of constants since
this is a bit costly to check, and IMO clarifying precedence with parentheses is good for
readability in general.
llvm-svn: 119533
2010-11-17 18:26:36 +00:00