summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: Understand sequenced casts.Daniel Jasper2014-08-252-2/+4
| | | | | | | | | | | | This fixed llvm.org/PR20712. Before: int i = (int)(int) -2; After: int i = (int)(int)-2; llvm-svn: 216378
* clang-format: Improve formatting of nested builder-type calls.Daniel Jasper2014-08-252-4/+8
| | | | | | | | | | | | Before: f(FirstToken->WhitespaceRange.getBegin().getLocWithOffset( First->LastNewlineOffset)); After: f(FirstToken->WhitespaceRange.getBegin() .getLocWithOffset(First->LastNewlineOffset)); llvm-svn: 216377
* MergeFunctions, tiny refactoring:Stepan Dyatkovskiy2014-08-251-3/+3
| | | | | | cmpAPFloat has been renamed to cmpAPFloats (multiple form). llvm-svn: 216376
* MergeFunctions, tiny refactoring:Stepan Dyatkovskiy2014-08-251-5/+5
| | | | | | cmpAPInt has been renamed to cmpAPInts (multiple form). llvm-svn: 216375
* MergeFunctions, tiny refactoring:Stepan Dyatkovskiy2014-08-251-12/+11
| | | | | | cmpType has been renamed to cmpTypes (multiple form). llvm-svn: 216374
* MergeFunctions, tiny refactoring:Stepan Dyatkovskiy2014-08-251-5/+5
| | | | | | cmpGEP has been renamed to cmpGEPs (multiple form). llvm-svn: 216373
* Add a little documentation for the register kindsJason Molenda2014-08-252-2/+40
| | | | | | and the method to convert between them. llvm-svn: 216372
* Allow vectorization of division by uniform power of 2.Karthik Bhat2014-08-2511-50/+187
| | | | | | | | This patch adds support to recognize division by uniform power of 2 and modifies the cost table to vectorize division by uniform power of 2 whenever possible. Updates Cost model for Loop and SLP Vectorizer.The cost table is currently only updated for X86 backend. Thanks to Hal, Andrea, Sanjay for the review. (http://reviews.llvm.org/D4971) llvm-svn: 216371
* Use range based for loops to avoid needing to re-mention SmallPtrSet size.Craig Topper2014-08-255-54/+35
| | | | llvm-svn: 216370
* [modules] Fix false report of an ODR violation when merging friendRichard Smith2014-08-254-2/+19
| | | | | | | | | | declarations. We can't expect to find them in the canonical definition of the class, because that's not where they live. This means we no longer reject real ODR violations with friend declarations, but we weren't consistently doing so anyway. llvm-svn: 216369
* CodeGen/LiveVariables: hoist out code in nested loopsDylan Noblesmith2014-08-252-110/+125
| | | | | | This makes runOnMachineFunction vastly more readable. llvm-svn: 216368
* CodeGen/LiveVariables: switch to std::vectorDylan Noblesmith2014-08-252-14/+16
| | | | | | No functionality change. llvm-svn: 216367
* AArch64: unique_ptr-ify map structuresDylan Noblesmith2014-08-251-26/+9
| | | | llvm-svn: 216366
* AArch64: use std::vector for temp arrayDylan Noblesmith2014-08-251-5/+4
| | | | llvm-svn: 216365
* NVPTX: remove another raw delete callDylan Noblesmith2014-08-251-3/+1
| | | | llvm-svn: 216364
* NVPTX: remove raw delete callDylan Noblesmith2014-08-251-10/+7
| | | | | | | Also make members that are never accessed outside the class private. llvm-svn: 216363
* ExecutionEngine: unique_ptr-ifyDylan Noblesmith2014-08-251-20/+12
| | | | | | NFC. llvm-svn: 216362
* EE/JIT: unique_ptr-ifyDylan Noblesmith2014-08-251-7/+3
| | | | llvm-svn: 216361
* Support/Path: remove raw deleteDylan Noblesmith2014-08-251-2/+2
| | | | llvm-svn: 216360
* Support/APFloat: unique_ptr-ify temp arraysDylan Noblesmith2014-08-251-11/+8
| | | | llvm-svn: 216359
* Analysis: unique_ptr-ify DependenceAnalysis::collectCoeffInfoDylan Noblesmith2014-08-252-11/+12
| | | | llvm-svn: 216358
* Analysis: unique_ptr-ify DependenceAnalysis::dependsDylan Noblesmith2014-08-252-11/+11
| | | | llvm-svn: 216357
* Analysis: take a reference instead of pointerDylan Noblesmith2014-08-252-7/+6
| | | | | | This parameter is never null. llvm-svn: 216356
* CodeGen: switch raw array to std::vectorDylan Noblesmith2014-08-252-10/+2
| | | | llvm-svn: 216355
* IR: remove dead codeDylan Noblesmith2014-08-251-3/+0
| | | | | | | | | | | | | | | | This was added in r134994, to fix a memory leak; three days later, r135248 switched ContainedTys from being new-allocated to being allocated via BumpPtrAllocator, and the earlier fix was never reverted. The destructor doesn't seem to ever actually be called on Types anyway, so it's harmless, but if it were, this'd be an invalid pointer. This reverts r134994. llvm-svn: 216354
* Fix bug 20740 - std::set/std::map don't support heterogeneous lookup for ↵Marshall Clow2014-08-246-2/+307
| | | | | | count(). Thanks to Jim Porter for the bug report llvm-svn: 216353
* PR20716 - Crash when recovering from type in known dependent base.Nikola Smiljanic2014-08-243-2/+25
| | | | llvm-svn: 216352
* Use range based for loops to avoid needing to re-mention SmallPtrSet size.Craig Topper2014-08-2432-205/+133
| | | | llvm-svn: 216351
* TableGen: unique_ptr-ify RecordKeeperDylan Noblesmith2014-08-244-24/+20
| | | | llvm-svn: 216350
* TableGen: delete no-op codeDylan Noblesmith2014-08-242-20/+0
| | | | | | | | | | | | | | | | This does nothing but remove the Record from the map, and then re-add it, without actually changing it in between. The Record's Name used to be changed before re-adding it when the code was first committed in r137232, but the name-changing lines were removed in r142510, and since then this code seems to do nothing. This was also the only caller of removeClass or removeDef, so now RecordKeeper owns its Records unconditionally, and could be unique_ptr-ified. llvm-svn: 216349
* TableGen: use auto and for-rangeDylan Noblesmith2014-08-243-27/+19
| | | | llvm-svn: 216348
* Frontend: unique_ptr-ifyDylan Noblesmith2014-08-241-4/+4
| | | | | | NFC. llvm-svn: 216347
* This code is from r216285, which did not go out to the mailing list for some ↵Aaron Ballman2014-08-241-6/+1
| | | | | | | | reason. The switch statement would never fire due to the preceding break statement. Also, the switch statement has a default label with no case labels. Simplified the code, and allow it to execute. llvm-svn: 216346
* X86 intrinsics table - simplifies intrinsics lowering.Elena Demikhovsky2014-08-243-456/+292
| | | | | | The tables are initialized when X86TargetLowering object is created. llvm-svn: 216345
* Silence gcc -Wpedantic.Patrik Hagglund2014-08-241-1/+1
| | | | llvm-svn: 216344
* InstCombine: Properly optimize or'ing bittests togetherDavid Majnemer2014-08-242-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CFE, with -03, would turn: bool f(unsigned x) { bool a = x & 1; bool b = x & 2; return a | b; } into: %1 = lshr i32 %x, 1 %2 = or i32 %1, %x %3 = and i32 %2, 1 %4 = icmp ne i32 %3, 0 This sort of thing exposes a nasty pathology in GCC, ICC and LLVM. Instead, we would rather want: %1 = and i32 %x, 3 %2 = icmp ne i32 %1, 0 Things get a bit more interesting in the following case: %1 = lshr i32 %x, %y %2 = or i32 %1, %x %3 = and i32 %2, 1 %4 = icmp ne i32 %3, 0 Replacing it with the following sequence is better: %1 = shl nuw i32 1, %y %2 = or i32 %1, 1 %3 = and i32 %2, %x %4 = icmp ne i32 %3, 0 This sequence is preferable because %1 doesn't involve %x and could potentially be hoisted out of loops if it is invariant; only perform this transform in the non-constant case if we know we won't increase register pressure. llvm-svn: 216343
* Move __vector long deprecation checking into DeclSpec::FinishHal Finkel2014-08-243-6/+13
| | | | | | | | | | | | __vector long is deprecated, but __vector long long is not. As a result, we cannot check for __vector long (to issue the deprecation warning) as we parse the type because we need to know how many 'long's we have first. DeclSpec::Finish seems like a more-appropriate place to perform the check (which places it with several other similar Altivec vector checks). Fixes PR20720. llvm-svn: 216342
* Implement __builtin_signbitl for PowerPCHal Finkel2014-08-242-2/+19
| | | | | | | | | | | PowerPC uses the special PPC_FP128 type for long double on Linux, which is composed of two 64-bit doubles. The higher-order double (which contains the overall sign) comes first, and so the __builtin_signbitl implementation requires special handling to extract the sign bit. Fixes PR20691. llvm-svn: 216341
* Don't assert on different DLL attributes in template and explicit ↵Hans Wennborg2014-08-245-12/+44
| | | | | | | | | | | | | | | | | | | | instantiation (PR20137) We would previously assert (a decl cannot have two DLL attributes) on this code: template <typename T> struct __declspec(dllimport) S { T f() { return T(); } }; template struct __declspec(dllexport) S<int>; The problem was that when instantiating, we would take the attribute from the template even if the instantiation itself already had an attribute. Also, don't inherit DLL attributes from the template to its members before instantiation, as the attribute may change. I couldn't figure out what MinGW does here, so I'm leaving that open. At least we're not asserting anymore. llvm-svn: 216340
* [PowerPC] Add support for dcbtst and icbt (prefetch)Hal Finkel2014-08-235-4/+52
| | | | | | | | | | | | Adds code generation support for dcbtst (data cache prefetch for write) and icbt (instruction cache prefetch for read - Book E cores only). We still end up with a 'cannot select' error for the non-supported prefetch intrinsic forms. This will be fixed in a later commit. Fixes PR20692. llvm-svn: 216339
* Support: add llvm::unique_lockDylan Noblesmith2014-08-234-25/+93
| | | | | | | | | | | | | | | Based on the STL class of the same name, it guards a mutex while also allowing it to be unlocked conditionally before destruction. This eliminates the last naked usages of mutexes in LLVM and clang. It also uncovered and fixed a bug in callExternalFunction() when compiled without USE_LIBFFI, where the mutex would never be unlocked if the end of the function was reached. llvm-svn: 216338
* Add another test for DLL attribute inheritance to partial specializationsHans Wennborg2014-08-231-0/+8
| | | | llvm-svn: 216337
* Support: make LLVM Mutexes STL-compatibleDylan Noblesmith2014-08-237-40/+42
| | | | | | Use lock/unlock() convention instead of acquire/release(). llvm-svn: 216336
* Support/Unix: use ScopedLock wherever possibleDylan Noblesmith2014-08-231-24/+22
| | | | | | | Only one function remains a bit too complicated for a simple mutex guard. No functionality change. llvm-svn: 216335
* Fix CodeGenCXX/dllexport.cpp test. Somehow this slipped out of my previous ↵Hans Wennborg2014-08-231-1/+1
| | | | | | commit. llvm-svn: 216334
* MS ABI: Inherit DLL attributes to partial class template specializationsHans Wennborg2014-08-233-0/+30
| | | | llvm-svn: 216333
* Resurect preprocessor definitions that got lost moving to HostInfoKeno Fischer2014-08-231-0/+10
| | | | | | | | | | When building without XCode on sytems where these constants are not in the system header (or I presume with older versions of XCode), these are needed to make this file compile, since unlike most other uses of MachO specific constants, these use the system headers rather than the LLVM-defined ones. llvm-svn: 216332
* cmake: actually test -WcommentDylan Noblesmith2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | This test was testing nothing, as only -Werror was ever being added to the compiler flags. You can see the final nitty-gritty compiler invocation in CMakeFiles/CMakeOutput.log (for successful tests) and CMakeFiles/CMakeError.log (for failed tests). Before: Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o /usr/bin/clang -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -DC_WCOMMENT_ALLOWS_LINE_WRAP -Werror -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c After: Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o /usr/bin/clang -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -DC_WCOMMENT_ALLOWS_LINE_WRAP -Werror -Wcomment -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c llvm-svn: 216328
* cmake: disable -Wnon-virtual-dtor when it gives false positivesDylan Noblesmith2014-08-231-2/+14
| | | | | | | | | clang has only been smart enough not to trigger -Wnon-virtual-dtor warnings on final classes since r208449 (in clang 3.5). Building with older versions is extremely noisy, so disable the warning on those compilers. llvm-svn: 216327
* checkDLLAttribute: remove a redundant dyn_castHans Wennborg2014-08-231-21/+19
| | | | | | The same dyn_cast was done earlier in the function. No functionality change. llvm-svn: 216326
OpenPOWER on IntegriCloud