- Jun 17, 2013
-
-
Nadav Rotem authored
llvm-svn: 184084
-
- Jun 15, 2013
-
-
Benjamin Kramer authored
llvm-svn: 184041
-
- Jun 13, 2013
-
-
Derek Schuff authored
This pass was assuming that if hasAddressTaken() returns false for a function, the function's only uses are call sites. That's not true because there can be references by BlockAddresses too. Fix the pass to handle this case. Fix BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type to be changed by RAUW'ing the function with a bitcast of the recreated function. Patch by Mark Seaborn. llvm-svn: 183933
-
- Jun 12, 2013
-
-
Rafael Espindola authored
Should fix the dragonegg build bots. llvm-svn: 183845
-
- Jun 11, 2013
-
-
Rafael Espindola authored
Instead of a custom implementation of replaceAllUsesWith, we just call replaceAllUsesWith and recreate llvm.used and llvm.compiler-used. This change is particularity interesting because it makes llvm see through what clang is doing with static used functions in extern "C" contexts. With this change, running clang -O2 in extern "C" { __attribute__((used)) static void foo() {} } produces @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata" define internal void @foo() #0 { entry: ret void } llvm-svn: 183756
-
- Jun 09, 2013
-
-
Tim Northover authored
Variadic functions are particularly fragile in the face of ABI changes, so this limits how much the pass changes them llvm-svn: 183625
-
- Jun 07, 2013
-
-
Nadav Rotem authored
Jeffrey Yasskin volunteered to benchmark the vectorizer on -O2 or -Os when compiling chrome. This patch adds a new flag to enable vectorization on all levels and not only on -O3. It should go away once we make a decision. llvm-svn: 183456
-
- Jun 01, 2013
-
-
Benjamin Kramer authored
Also simplify code a bit while there. No functionality change. llvm-svn: 183076
-
- May 14, 2013
-
-
Manman Ren authored
CXAAtExitFn was set outside a loop and before optimizations where functions can be deleted. This patch will set CXAAtExitFn inside the loop and after optimizations. Seg fault when running LTO because of accesses to a deleted function. rdar://problem/13838828 llvm-svn: 181838
-
- May 09, 2013
-
-
Rafael Espindola authored
When we replace an internal alias with its target, be careful not to replace the entry in llvm.used (and llvm.compiler_used). llvm-svn: 181524
-
- May 06, 2013
-
-
Rafael Espindola authored
We used to disable constant merging not only if a constant is llvm.used, but also if an alias of a constant is llvm.used. This change fixes that. llvm-svn: 181175
-
- May 01, 2013
-
-
Filip Pizlo authored
the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. llvm-svn: 180881
-
- Apr 23, 2013
-
-
Eric Christopher authored
or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
-
- Apr 22, 2013
-
-
Rafael Espindola authored
Also add a check for llvm.used in the verifier and simplify clients now that they can assume they have a ConstantArray. llvm-svn: 180019
-
- Apr 20, 2013
-
-
Benjamin Kramer authored
The logic that actually compares the types considers pointers and integers the same if they are of the same size. This created a strange mismatch between hash and reality and made the test case for this fail on some platforms (yay, test cases). llvm-svn: 179905
-
- Apr 19, 2013
-
-
Bill Wendling authored
If the return type is a pointer and the call returns an integer, then do the inttoptr convertions. And vice versa. llvm-svn: 179817
-
- Apr 16, 2013
-
-
Bill Wendling authored
Two return types are not equivalent if one is a pointer and the other is an integral. This is because we cannot bitcast a pointer to an integral value. PR15185 llvm-svn: 179569
-
Nadav Rotem authored
SLPVectorizer: Make it a function pass and add code for hoisting the vector-gather sequence out of loops. llvm-svn: 179562
-
- Apr 15, 2013
-
-
Nadav Rotem authored
Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer. llvm-svn: 179508
-
Nadav Rotem authored
llvm-svn: 179505
-
- 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
-