- Apr 13, 2013
-
-
Benjamin Kramer authored
There is a Constant with non-constant operands: blockaddress. llvm-svn: 179460
-
Benjamin Kramer authored
This is basically the same fix in three different places. We use a set to avoid walking the whole tree of a big ConstantExprs multiple times. For example: (select cmp, (add big_expr 1), (add big_expr 2)) We don't want to visit big_expr twice here, it may consist of thousands of nodes. The testcase exercises this by creating an insanely large ConstantExprs out of a loop. It's questionable if the optimizer should ever create those, but this can be triggered with real C code. Fixes PR15714. llvm-svn: 179458
-
- Apr 02, 2013
-
-
Bill Wendling authored
The iterator could be invalidated when it's recursively deleting a whole bunch of constant expressions in a constant initializer. Note: This was only reproducible if `opt' was run on a `.bc' file. If `opt' was run on a `.ll' file, it wouldn't crash. This is why the test first pushes the `.ll' file through `llvm-as' before feeding it to `opt'. PR15440 llvm-svn: 178531
-
- Mar 21, 2013
-
-
Meador Inge authored
The simplify-libcalls pass implemented a doInitialization hook to infer function prototype attributes for well-known functions. Given that the simplify-libcalls pass is going away *and* that the functionattrs pass is already in place to deduce function attributes, I am moving this logic to the functionattrs pass. This approach was discussed during patch review: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157465.html. llvm-svn: 177619
-
- Mar 10, 2013
-
-
Nick Lewycky authored
llvm-svn: 176793
-
- Mar 06, 2013
-
-
Andrew Trick authored
Always print options that differ from their implicit default. At least for simple option types. llvm-svn: 176572
-
Andrew Trick authored
This way, clang -mllvm -print-options shows that the driver is overriding it. llvm-svn: 176569
-
- Mar 04, 2013
-
-
Lang Hames authored
GlobalValue linkage up to ExternalLinkage in the ExtractGV pass. This prevents linkonce and linkonce_odr symbols from being DCE'd. llvm-svn: 176459
-
- Feb 14, 2013
-
-
Bill Wendling authored
It's possible (e.g. after an LTO build) that an internal global may be used for debugging purposes. If that's the case appending a '.b' to it makes it hard to find that variable. Steal the name from the old GV before deleting it so that they can find that variable again. llvm-svn: 175104
-
- Feb 02, 2013
-
-
Nick Lewycky authored
llvm-svn: 174241
-
Nick Lewycky authored
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use. Also fixes a bug in the previous patch that caused us to not mark the function referenced just because we didn't want to mark it odr used. llvm-svn: 174240
-
- Jan 31, 2013
-
-
Bill Wendling authored
llvm-svn: 173992
-
Bill Wendling authored
There are still places which treat the Attribute object as a collection of attributes. I'm systematically removing them. llvm-svn: 173990
-
- Jan 29, 2013
-
-
Hal Finkel authored
Because BBVectorize may significantly shorten a loop body, unroll again after vectorization. This is especially important when using runtime or partial unrolling. llvm-svn: 173730
-
- Jan 28, 2013
-
-
Michael Gottesman authored
Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. llvm-svn: 173647
-
- Jan 27, 2013
-
-
Bill Wendling authored
In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173601
-
Bill Wendling authored
In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173600
-
- Jan 26, 2013
-
-
Bill Wendling authored
The 'getSlot' function and its ilk allow introspection into the AttributeSet class. However, that class should be opaque. Allow access through accessor methods instead. llvm-svn: 173522
-
- Jan 25, 2013
-
-
Bill Wendling authored
llvm-svn: 173499
-
Pedro Artigas authored
created InternalizePass (useful for pass reuse) llvm-svn: 173474
-
- Jan 23, 2013
-
-
Bill Wendling authored
SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. llvm-svn: 173230
-
Bill Wendling authored
Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. llvm-svn: 173228
-
Bill Wendling authored
when removing one attribute. This further encapsulates the use of the attributes. llvm-svn: 173214
-
Bill Wendling authored
when adding a single attribute to the function. llvm-svn: 173210
-
- Jan 22, 2013
-
-
Bill Wendling authored
Use the AttributeSet when we're talking about more than one attribute. Add a function that adds a single attribute. No functionality change intended. llvm-svn: 173196
-
- Jan 21, 2013
-
-
Bill Wendling authored
This further restricts the use of the Attribute class to the Attribute family of classes. llvm-svn: 173098
-
Bill Wendling authored
This is more code to isolate the use of the Attribute class to that of just holding one attribute instead of a collection of attributes. llvm-svn: 173094
-
Chandler Carruth authored
a dynamic analysis done on each call to the routine. However, now it can use the standard pass infrastructure to reference other analyses, instead of a silly setter method. This will become more interesting as I teach it about more analysis passes. This updates the two inliner passes to use the inline cost analysis. Doing so highlights how utterly redundant these two passes are. Either we should find a cheaper way to do always inlining, or we should merge the two and just fiddle with the thresholds to get the desired behavior. I'm leaning increasingly toward the latter as it would also remove the Inliner sub-class split. llvm-svn: 173030
-
Chandler Carruth authored
Formatting fixes brought to you by clang-format. llvm-svn: 173029
-
Chandler Carruth authored
functionality changed. llvm-svn: 173028
-
- Jan 18, 2013
-
-
Bill Wendling authored
Further encapsulation of the Attribute object. Don't allow direct access to the Attribute object as an aggregate. llvm-svn: 172853
-
Bill Wendling authored
Because the Attribute class is going to stop representing a collection of attributes, limit the use of it as an aggregate in favor of using AttributeSet. This replaces some of the uses for querying the function attributes. llvm-svn: 172844
-
- Jan 13, 2013
-
-
Dmitri Gribenko authored
llvm-svn: 172358
-
- Jan 12, 2013
-
-
Benjamin Kramer authored
Found by valgrind. llvm-svn: 172318
-
Michael Gottesman authored
llvm-svn: 172271
-
- Jan 11, 2013
-
-
Michael Gottesman authored
Specifically: 1. Added a missing new line when we emit a debug message saying that we are marking a global variable as constant. 2. Added debug messages that describe what is occuring when GlobalOpt is evaluating a block/function. 3. Added a debug message that says what specific constructor is being evaluated. llvm-svn: 172247
-
- Jan 10, 2013
-
-
Joey Gouly authored
llvm-svn: 172051
-
- Jan 07, 2013
-
-
Chandler Carruth authored
llvm-svn: 171749
-
Chandler Carruth authored
implementation lives already. llvm-svn: 171746
-
Chandler Carruth authored
builder these days, and this thing hasn't seen updates for a very long time. llvm-svn: 171741
-