summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update comment to accurately reflect what should happen.Eric Christopher2012-08-041-1/+1
| | | | llvm-svn: 161286
* Delete a dead variable.Jakob Stoklund Olesen2012-08-041-12/+0
| | | | | | TwoAddressInstructionPass doesn't remat any more. llvm-svn: 161285
* TwoAddressInstructionPass refactoring: Extract another method.Jakob Stoklund Olesen2012-08-031-121/+134
| | | | llvm-svn: 161284
* [analyzer] Update initializer assertion for delegating constructors.Jordan Rose2012-08-033-3/+25
| | | | | | | | | | Like base constructors, delegating constructors require no further processing in the CFGInitializer node. Also, add PrettyStackTraceLoc to the initializer and destructor logic so we can get better stack traces in the future. llvm-svn: 161283
* Refactor and check "onlyReadsMemory" before optimizing builtins.Bob Wilson2012-08-0313-102/+49
| | | | | | | | | This patch is mostly just refactoring a bunch of copy-and-pasted code, but it also adds a check that the call instructions are readnone or readonly. That check was already present for sin, cos, sqrt, log2, and exp2 calls, but it was missing for the rest of the builtins being handled in this code. llvm-svn: 161282
* TwoAddressInstructionPass refactoring: Extract a method.Jakob Stoklund Olesen2012-08-031-48/+60
| | | | | | | No functional change intended, except replacing a DenseMap with a SmallDenseMap which should behave identically. llvm-svn: 161281
* [analyzer] When a symbol is null, we should track its constraints.Jordan Rose2012-08-0318-59/+92
| | | | | | | | Because of this, we would previously emit NO path notes when a parameter is constrained to null (because there are no stores). Now we show where we made the assumption, which is much more useful. llvm-svn: 161280
* [analyzer] Flatten path diagnostics for text output like we do for HTML.Jordan Rose2012-08-036-37/+74
| | | | llvm-svn: 161279
* [analyzer] Track null/uninitialized C++ objects used in method calls.Jordan Rose2012-08-036-57/+64
| | | | llvm-svn: 161278
* [analyzer] Provide useful PathDiagnosticLocations for CallEnter/Exit events.Jordan Rose2012-08-031-37/+51
| | | | llvm-svn: 161277
* [analyzer] FindLastStoreBRVisitor was not actually finding stores.Jordan Rose2012-08-031-11/+11
| | | | | | | | | | | The visitor walks back through the ExplodedGraph as expected, but it wasn't actually keeping track of when a value was assigned. This meant that it only worked when the value was assigned when the variable was defined. Tests in the next commit (dependent on another change). llvm-svn: 161276
* Enhance getImplicitObjectArgument to look through ->*.Jordan Rose2012-08-032-2/+12
| | | | | | | This only applies in the case where ->* is not overloaded, since it specifically looks for BinaryOperator and not CXXOperatorCallExpr. llvm-svn: 161275
* [analyzer] Add a test for copy-constructor inlining.Jordan Rose2012-08-031-1/+31
| | | | llvm-svn: 161274
* Begin adding support for updating LiveIntervals in TwoAddressInstructionPass.Jakob Stoklund Olesen2012-08-031-0/+23
| | | | | | | This is far from complete, and only changes behavior when the -early-live-intervals flag is passed to llc. llvm-svn: 161273
* 1. Redo mips16 instructions to avoid multiple opcodes for same instruction.Akira Hatanaka2012-08-0321-54/+605
| | | | | | | | | Change these to patterns. 2. Add another 16 instructions. Patch by Reed Kotler. llvm-svn: 161272
* <rdar://problem/12027563> Making sure that some class of stop-hook commands ↵Enrico Granata2012-08-033-8/+29
| | | | | | that involve po'ing objects do not cause an endless recursion llvm-svn: 161271
* Add an experimental -early-live-intervals option.Jakob Stoklund Olesen2012-08-033-0/+14
| | | | | | | | | | This option runs LiveIntervals before TwoAddressInstructionPass which will eventually learn to exploit and update the analysis. Eventually, LiveIntervals will run before PHIElimination, and we can get rid of LiveVariables. llvm-svn: 161270
* Delete merged physreg copies in joinReservedPhysReg().Jakob Stoklund Olesen2012-08-031-0/+5
| | | | | | | Previously, the identity copy would survive through register allocation before it was removed by the rewriter. llvm-svn: 161269
* Fixes apple: #12020687. This was a problem in the demangler with templateHoward Hinnant2012-08-032-2/+4
| | | | | | | | | substitution forward references. That is, sometimes a mangled name refers to a substitution that hasn't yet been defined. The demangler was derferencing a null pointer in this case because it wasn't properly guarded against a forward reference. Test case added to catch this problem. llvm-svn: 161267
* Make property synthesis the default on Windows.Fariborz Jahanian2012-08-031-0/+4
| | | | llvm-svn: 161266
* [analyzer] Fixup: remove the extra whitespaceAnna Zaks2012-08-031-26/+0
| | | | llvm-svn: 161265
* [analyzer] ObjC Inlining: Start tracking dynamic type info in the GDMAnna Zaks2012-08-034-5/+75
| | | | | | | | | | | In the following code, find the type of the symbolic receiver by following it and updating the dynamic type info in the state when we cast the symbol from id to MyClass *. MyClass *a = [[self alloc] init]; return 5/[a testSelf]; llvm-svn: 161264
* Try to reduce the compile time impact of r161232.Bob Wilson2012-08-033-43/+84
| | | | | | | | | | | | The previous change caused fast isel to not attempt handling any calls to builtin functions. That included things like "printf" and caused some noticable regressions in compile time. I wanted to avoid having fast isel keep a separate list of functions that had to be kept in sync with what the code in SelectionDAGBuilder.cpp was handling. I've resolved that here by moving the list into TargetLibraryInfo. This is somewhat redundant in SelectionDAGBuilder but it will ensure that we keep things consistent. llvm-svn: 161263
* Fix memcmp code-gen to honor -fno-builtin.Bob Wilson2012-08-033-1/+16
| | | | | | | | | I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp in TargetLibraryInfo, so that it would use custom code for memcmp calls even with -fno-builtin. I also had to add a new -disable-simplify-libcalls option to llc so that I could write a test for this. llvm-svn: 161262
* Comment diagnostics: warn if \returns is used in a non-function comment or ifDmitri Gribenko2012-08-036-7/+148
| | | | | | the function returns void. llvm-svn: 161261
* Fix crash if a literal operator template's template parameter pack is not a ↵Richard Smith2012-08-032-1/+2
| | | | | | non-type template parameter pack. Patch by Andy Gibbs! llvm-svn: 161260
* Completely eliminate VNInfo flags.Jakob Stoklund Olesen2012-08-033-32/+8
| | | | | | | | The 'unused' state of a value number can be represented as an invalid def SlotIndex. This also exposed code that shouldn't have been looking at unused value VNInfos. llvm-svn: 161258
* Fix a couple of loops that were processing unused value numbers.Jakob Stoklund Olesen2012-08-031-1/+5
| | | | | | | Unused VNInfos should be left alone. Their def SlotIndex doesn't point to anything. llvm-svn: 161257
* Silence unused variable warning in -asserts buildMatt Beaumont-Gay2012-08-031-0/+1
| | | | llvm-svn: 161256
* Eliminate the VNInfo::hasPHIKill() flag.Jakob Stoklund Olesen2012-08-035-45/+3
| | | | | | | | | | The only real user of the flag was removeCopyByCommutingDef(), and it has been switched to LiveIntervals::hasPHIKill(). All the code changed by this patch was only concerned with computing and propagating the flag. llvm-svn: 161255
* Make the hasPHIKills flag a computed property.Jakob Stoklund Olesen2012-08-033-4/+29
| | | | | | | | | | | | | The VNInfo::HAS_PHI_KILL is only half supported. We precompute it in LiveIntervalAnalysis, but it isn't properly updated by live range splitting and functions like shrinkToUses(). It is only used in one place: RegisterCoalescer::removeCopyByCommutingDef(). This patch changes that function to use a new LiveIntervals::hasPHIKill() function that computes the flag for a given value number. llvm-svn: 161254
* Add a configure flag for enabling -Werror on the command lineEric Christopher2012-08-034-3/+43
| | | | | | while building as requested by Lang. llvm-svn: 161253
* Add support for detecting libxml for Dmitri's work. He'llEric Christopher2012-08-034-2/+174
| | | | | | commit code in clang that uses this shortly. llvm-svn: 161252
* Add a configure option to pass -std=c++11 on the command line.Eric Christopher2012-08-034-3/+44
| | | | | | rdar://11366674 llvm-svn: 161251
* Remove a dead prototype.Jakob Stoklund Olesen2012-08-031-7/+0
| | | | llvm-svn: 161250
* [analyzer] Fix a typo. Thanks Jordan.Anna Zaks2012-08-031-1/+1
| | | | llvm-svn: 161249
* [analyzer] Malloc: track non-allocated but freed memoryAnna Zaks2012-08-032-15/+15
| | | | | | | | | | There is no reason why we should not track the memory which was not allocated in the current function, but was freed there. This would allow to catch more use-after-free and double free with no/limited IPA. Also fix a realloc issue which surfaced as the result of this patch. llvm-svn: 161248
* Performance tweaking rotate.Howard Hinnant2012-08-031-27/+84
| | | | | | | | | | | | | | | | | | | | | | rotate is a critical algorithm because it is often used by other algorithms, both std and non-std. The main thrust of this optimization is a specialized algorithm when the 'distance' to be shifted is 1 (either left or right). To my surprise, this 'optimization' was not effective for types like std::string. std::string favors rotate algorithms which only use swap. But for types like scalars, and especially when the sequence is random access, these new specializations are a big win. If it is a vector<size_t> for example, the rotate is done via a memmove and can be several times faster than the gcd algorithm. I'm using is_trivially_move_assignable to distinguish between types like int and types like string. This is obviously an ad-hoc approximation, but I haven't found a case where it doesn't give good results. I've used a 'static if' (with is_trivially_move_assignable) in three places. Testing with both -Os and -O3 showed that clang eliminated all code not be executed by the 'static if' (including the 'static if' itself). llvm-svn: 161247
* Revert previous patch here, we should instead configure in specificEric Christopher2012-08-034-17/+9
| | | | | | packages for particular uses. llvm-svn: 161246
* Fix line endings.Michael Han2012-08-031-41/+41
| | | | llvm-svn: 161245
* TableGen: Remove extraneous \ character from arm_neon.h definitions.Jim Grosbach2012-08-031-1/+1
| | | | llvm-svn: 161244
* Flesh out test for defaulted key functions a bit more.Benjamin Kramer2012-08-032-3/+31
| | | | llvm-svn: 161243
* Delete dead function.Jakob Stoklund Olesen2012-08-031-28/+0
| | | | llvm-svn: 161242
* Don't delete dead code in TwoAddressInstructionPass.Jakob Stoklund Olesen2012-08-031-104/+0
| | | | | | | This functionality was added before we started running DeadMachineInstructionElim on all targets. It serves no purpose now. llvm-svn: 161241
* allow 'make CPPFLAGS=<something>' work againGabor Greif2012-08-031-1/+1
| | | | | | | | this makes this hack a bit more bearable for poor souls who need to pass custom preprocessor flags to the build process llvm-svn: 161240
* Add preliminary implementation for GPGPU code generation.Tobias Grosser2012-08-0321-1/+1397
| | | | | | | | | | | | | | | | | | | | | | Translate the selected parallel loop body into a ptx string and run it with the cuda driver API. We limit this preliminary implementation to target the following special test cases: - Support only 2-dimensional parallel loops with or without only one innermost non-parallel loop. - Support write memory access to only one array in a SCoP. The patch was committed with smaller changes to the build system: There is now a flag to enable gpu code generation explictly. This was required as we need the llvm.codegen() patch applied on the llvm sources, to compile this feature correctly. Also, enabling gpu code generation does not require cuda. This requirement was removed to allow 'make polly-test' runs, even without an installed cuda runtime. Contributed by: Yabin Hu <yabin.hwu@gmail.com> llvm-svn: 161239
* Reduce temp file pollution in some test cases.Benjamin Kramer2012-08-033-3/+3
| | | | llvm-svn: 161237
* Fix failed to generate vtables in certain cases.Benjamin Kramer2012-08-032-0/+14
| | | | | | | | | | | By C++ standard, the vtable should be generated if the first non-inline virtual function is defined in the TU. Current version of clang doesn't generate vtable if the first virtual function is defaulted, because the key function is regarded as the defaulted function. Patch by Li Kan! llvm-svn: 161236
* Remove 'using namespace llvm' from header fileTobias Grosser2012-08-031-27/+25
| | | | | | | | | This fixes a conflict between polly::createIndVarSimplifyPass() and llvm::createIndVarSimplifyPass(), which causes problems on windows. Reported by: Michael Kruse <MichaelKruse@meinersbur.de llvm-svn: 161235
* cmake: Fix building of Polly on Apple systemTobias Grosser2012-08-032-1/+11
| | | | | | | | | | The Apple linker fails by default, if some function calls can not be resolved at link time. However, all functions that are part of LLVM itself will not be linked into Polly, but will be provided by the compiler that Polly is loaded into. Hence, during linking we need to ignore failures due to unresolved function calls. llvm-svn: 161234
OpenPOWER on IntegriCloud