- Jun 17, 2009
-
-
Torok Edwin authored
llvm-svn: 73625
-
Dan Gohman authored
llvm-svn: 73621
-
Sanjiv Gupta authored
>> What if my global variable was into a different address space than stack? >> > > It doesn't matter in terms of semantics: because AnalyzeGlobal > returned false, we're guaranteed the address of the global is never > taken. I wouldn't be surprised if we end up generating invalid IR in > some cases, though, because of the semantics of replaceAllUsesWith. > Do you have a testcase that breaks? > > The problem is replaceAllUsesWith asserts for type mismatch here. Try attached .bc with llvm-ld. assert(New->getType() == getType() && "replaceAllUses of value with new value of different type!"); Since stack is always on address space zero, I don't think that type of GV in a different address space is ever going to match. The other way is to allow replaceAllUsesWith to ignore address spaces while comparing types. (do we have a way to do that ?). But then such an optimization may fail the entire idea of user wanting to place a variable into different memory space. The original idea of user might be to save on the stack space (data memory) and hence he asked the variable to be placed into different memory space (program memory). So the best bet here is to deny this optimization by checking GV->getType()->getAddressSpace() == 0. llvm-svn: 73605
-
Eli Friedman authored
SRem. llvm-svn: 73598
-
- Jun 16, 2009
-
-
Dan Gohman authored
llvm-svn: 73541
-
Chris Lattner authored
to ignore readonly calls, and factor it out of instcombine so that it can be used by other passes. Patch by Frits van Bommel! llvm-svn: 73506
-
Dan Gohman authored
llvm-svn: 73451
-
Dan Gohman authored
failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
-
- Jun 15, 2009
-
-
Dale Johannesen authored
problem addressed in 31284, but the patch there only addressed the case where an invoke is the first thing in a block. llvm-svn: 73416
-
Owen Anderson authored
llvm-svn: 73412
-
Dan Gohman authored
llvm-svn: 73398
-
Dan Gohman authored
llvm-svn: 73362
-
Dan Gohman authored
SmallVector instead of std::vector. llvm-svn: 73357
-
Dan Gohman authored
llvm-svn: 73355
-
- Jun 14, 2009
-
-
Torok Edwin authored
llvm-svn: 73342
-
Owen Anderson authored
is that, for functions whose bodies are entirely guarded by an if-statement, it can be profitable to pull the test out of the callee and into the caller. This code has had some cursory testing, but still has a number of known issues on the LLVM test suite. llvm-svn: 73338
-
- Jun 13, 2009
-
-
Nick Lewycky authored
pointer. This fixes kimwitu++. Pointed out by Frits van Bommel on review! llvm-svn: 73299
-
Dan Gohman authored
induction variable when the addrec to be expanded does not require a wider type. This eliminates the need for IndVarSimplify to micro-manage SCEV expansions, because SCEVExpander now automatically expands them in the form that IndVarSimplify considers to be canonical. (LSR still micro-manages its SCEV expansions, because it's optimizing for the target, rather than for other optimizations.) Also, this uses the new getAnyExtendExpr, which has more clever expression simplification logic than the IndVarSimplify code it replaces, and this cleans up some ugly expansions in code such as the included masked-iv.ll testcase. llvm-svn: 73294
-
- Jun 12, 2009
-
-
Chris Lattner authored
non-default addrspaces. llvm-svn: 73253
-
Dan Gohman authored
it may round differently. This fixes PR4374. llvm-svn: 73243
-
Dan Gohman authored
the relationship with MergeFunctions.cpp's isEquivalentOperation, and make a trivial code reordering so that the two functions are easier to compare. Fix the name of Instruction::isSameOperationAs in MergeFunction.cpp's isEquivalentOperation's comment, and fix a nearby 80-column violation. llvm-svn: 73241
-
Nick Lewycky authored
llvm-svn: 73235
-
Nick Lewycky authored
llvm-svn: 73231
-
Nick Lewycky authored
thunks. llvm-svn: 73230
-
Nick Lewycky authored
points to while analyzing all other fields. Use FoldingSetNodeID to produce a good hash. This dramatically decreases run times. Emit thunks. This means that it can look at all functions regardless of what the linkage is or if the address is taken, but unfortunately some small functions can be even shorter than the thunk because our backend doesn't yet realize it can just turn these into jumps. This means that this pass will pessimize code on average. llvm-svn: 73222
-
- Jun 11, 2009
-
-
Chris Lattner authored
turned into unreachable. llvm-svn: 73195
-
- Jun 10, 2009
-
-
Jay Foad authored
llvm-svn: 73164
-
- Jun 09, 2009
-
-
Jay Foad authored
identical function ConstantIsDead() to SafeToDestroyConstant(), to emphasise the connection with Constant::destroyConstant(). llvm-svn: 73149
-
- Jun 07, 2009
-
-
Nick Lewycky authored
Fixes PR4314. llvm-svn: 73007
-
- Jun 06, 2009
-
-
Eli Friedman authored
sometimes it can find simplifications that won't be found otherwise. llvm-svn: 73006
-
Jay Foad authored
Instructions. llvm-svn: 73002
-
Devang Patel authored
llvm-svn: 72965
-
- Jun 05, 2009
-
-
Dan Gohman authored
integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
-
- Jun 04, 2009
-
-
Dan Gohman authored
instcombine doesn't know when it's safe. To partially compensate for this, introduce new code to do this transformation in dagcombine, which can use UnsafeFPMath. llvm-svn: 72872
-
- Jun 03, 2009
-
-
Dan Gohman authored
be simplified to a loop-invariant value. This fixes PR4315. llvm-svn: 72798
-
- Jun 02, 2009
-
-
Dan Gohman authored
addresses, involving Base values which do not have Pointer type. This fixes PR4297. llvm-svn: 72739
-
Evan Cheng authored
Avoid infinite looping in AllGlobalLoadUsesSimpleEnoughForHeapSRA(). This can happen when PHI uses are recursively dependent on each other. llvm-svn: 72710
-
- Jun 01, 2009
-
-
Eli Friedman authored
RewriteStoreUserOfWholeAlloca deal with tail padding because isSafeUseOfBitCastedAllocation expects them to. Otherwise, we crash trying to erase the bitcast. llvm-svn: 72688
-
- May 31, 2009
-
-
Owen Anderson authored
a single predecessor. Patch by Jakub Staszak. llvm-svn: 72661
-
- May 30, 2009
-
-
Chris Lattner authored
Benjamin Kramer! llvm-svn: 72625
-