summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused, awkward CFGStmtVisitor and subclasses.Jordan Rose2013-05-158-807/+19
| | | | | | | | | | | | | | | | | This class is a StmtVisitor that distinguishes between block-level and non-block-level statements in a CFG. However, it does so using a hard-coded idea of which statements might be block-level, which probably isn't accurate anymore. The only implementer of the CFGStmtVisitor hierarchy was the analyzer's DeadStoresChecker, and the analyzer creates a linearized CFG anyway (every non-trivial statement is a block-level statement). This also allows us to remove the block-expr map ("BlkExprMap"), which mapped statements to positions in the CFG. Apart from having a helper type that really should have just been Optional<unsigned>, it was only being used to ask /if/ a particular expression was block-level, for traversal purposes in CFGStmtVisitor. llvm-svn: 181945
* Revert "Support unaligned load/store on more ARM targets"Derek Schuff2013-05-151-17/+4
| | | | | | This reverts r181898. llvm-svn: 181944
* Remove dead code.Eli Bendersky2013-05-152-21/+0
| | | | | | This method is not being used/tested anywhere. llvm-svn: 181943
* LoopVectorize: Move call of canHoistAllLoads to canVectorizeWithIfConvertArnold Schwaighofer2013-05-151-4/+4
| | | | | | | | | We only want to check this once, not for every conditional block in the loop. No functionality change (except that we don't perform a check redudantly anymore). llvm-svn: 181942
* Delete dead code.Rafael Espindola2013-05-151-19/+9
| | | | llvm-svn: 181941
* Objective-C: More cases of -Wsign-conversion notFariborz Jahanian2013-05-152-8/+28
| | | | | | | working on new Objective-C array subscripting syntax. // rdar://13855682 llvm-svn: 181940
* Set an explicit triple for this test.David Majnemer2013-05-151-1/+1
| | | | | | This allows the test to correctly check symbol names. llvm-svn: 181939
* undef setjmp in PPCCTRLoopsHal Finkel2013-05-151-0/+16
| | | | | | | Trying to unbreak the VS build by copying some undef code from Utils/LowerInvoke.cpp. llvm-svn: 181938
* X86: Remove redundant test instructionsDavid Majnemer2013-05-152-7/+193
| | | | | | | | Increase the number of instructions LLVM recognizes as setting the ZF flag. This allows us to remove test instructions that redundantly recalculate the flag. llvm-svn: 181937
* Remove cv qualifiers from member pointers in the __member_pointer_traits ↵Howard Hinnant2013-05-152-1/+19
| | | | | | test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests. llvm-svn: 181935
* Use proper syntax.Bill Wendling2013-05-151-1/+1
| | | | llvm-svn: 181930
* Implement PPC counter loops as a late IR-level passHal Finkel2013-05-1515-674/+1834
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old PPCCTRLoops pass, like the Hexagon pass version from which it was derived, could only handle some simple loops in canonical form. We cannot directly adapt the new Hexagon hardware loops pass, however, because the Hexagon pass contains a fundamental assumption that non-constant-trip-count loops will contain a guard, and this is not always true (the result being that incorrect negative counts can be generated). With this commit, we replace the pass with a late IR-level pass which makes use of SE to calculate the backedge-taken counts and safely generate the loop-count expressions (including any necessary max() parts). This IR level pass inserts custom intrinsics that are lowered into the desired decrement-and-branch instructions. The most fragile part of this new implementation is that interfering uses of the counter register must be detected on the IR level (and, on PPC, this also includes any indirect branches in addition to function calls). Also, to make all of this work, we need a variant of the mtctr instruction that is marked as having side effects. Without this, machine-code level CSE, DCE, etc. illegally transform the resulting code. Hopefully, this can be improved in the future. This new pass is smaller than the original (and much smaller than the new Hexagon hardware loops pass), and can handle many additional cases correctly. In addition, the preheader-creation code has been copied from LoopSimplify, and after we decide on where it belongs, this code will be refactored so that it can be explicitly shared (making this implementation even smaller). The new test-case files ctrloop-{le,lt,ne}.ll have been adapted from tests for the new Hexagon pass. There are a few classes of loops that this pass does not transform (noted by FIXMEs in the files), but these deficiencies can be addressed within the SE infrastructure (thus helping many other passes as well). llvm-svn: 181927
* Fix legalization of SETCC with promoted integer intrinsicsHal Finkel2013-05-151-2/+13
| | | | | | | | | | | | | | | | | | If the input operands to SETCC are promoted, we need to make sure that we either use the promoted form of both operands (or neither); a mixture is not allowed. This can happen, for example, if a target has a custom promoted i1-returning intrinsic (where i1 is not a legal type). In this case, we need to use the promoted form of both operands. This change only augments the behavior of the existing logic in the case where the input types (which may or may not have already been legalized) disagree, and should not affect existing target code because this case would otherwise cause an assert in the SETCC operand promotion code. This will be covered by (essentially all of the) tests for the new PPCCTRLoops infrastructure. llvm-svn: 181926
* Add lldb and polly to the projects to tag.Bill Wendling2013-05-151-2/+3
| | | | llvm-svn: 181925
* Try to improve performance by using a read/write buffer instead of I/O.Bill Wendling2013-05-155-52/+112
| | | | | | | | | | The calls to fwrite/fread can be very expensive. GCC avoids this by using a buffer to read and write from the file, thus limiting the number of fwrite/fread calls. <rdar://problem/13466086> llvm-svn: 181924
* Fix miscompile due to StackColoring incorrectly merging stack slots (PR15707)Derek Schuff2013-05-152-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IR optimisation passes can result in a basic block that contains: llvm.lifetime.start(%buf) ... llvm.lifetime.end(%buf) ... llvm.lifetime.start(%buf) Before this change, calculateLiveIntervals() was ignoring the second lifetime.start() and was regarding %buf as being dead from the lifetime.end() through to the end of the basic block. This can cause StackColoring to incorrectly merge %buf with another stack slot. Fix by removing the incorrect Starts[pos].isValid() and Finishes[pos].isValid() checks. Just doing: Starts[pos] = Indexes->getMBBStartIdx(MBB); Finishes[pos] = Indexes->getMBBEndIdx(MBB); unconditionally would be enough to fix the bug, but it causes some test failures due to stack slots not being merged when they were before. So, in order to keep the existing tests passing, treat LiveIn and LiveOut separately rather than approximating the live ranges by merging LiveIn and LiveOut. This fixes PR15707. Patch by Mark Seaborn. llvm-svn: 181922
* Fixed an xpass due to r181841 on Linux with gcc. Note that the clang ↵Ashok Thirumurthi2013-05-151-1/+0
| | | | | | variant contains to xfail, and r181841 is a fix for the test. llvm-svn: 181918
* <rdar://problem/13128331>Greg Clayton2013-05-152-25/+69
| | | | | | | | Fixed "target symbols add" to correctly extract all module specifications from a dSYM file that is supplied and match the symbol file to a current target module using the UUID values if they are available. This fixes the case where you add a dSYM file (like "foo.dSYM") which is for a renamed executable (like "bar"). In our case it was "mach_kernel.dSYM" which didn't match "mach_kernel.sys". llvm-svn: 181916
* Test commitSamuel Benzaquen2013-05-151-3/+3
| | | | llvm-svn: 181915
* Objective-C: patch to issue the conversionFariborz Jahanian2013-05-152-1/+28
| | | | | | | warning when property-dot syntax is used with -Wsign-conversion. // rdar://13855394 llvm-svn: 181914
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-1541-52/+52
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Fixed a few obvious errors pointed out by the static analyzer.Jim Ingham2013-05-1510-7/+20
| | | | llvm-svn: 181911
* Cleanup relocation sorting for ELF.Rafael Espindola2013-05-153-58/+16
| | | | | | | | | | We want the order to be deterministic on all platforms. NAKAMURA Takumi fixed that in r181864. This patch is just two small cleanups: * Move the function to the cpp file. It is only passed to array_pod_sort. * Remove the ppc implementation which is now redundant llvm-svn: 181910
* [analyzer] Put back DefaultBool's implicit conversion to bool.Jordan Rose2013-05-151-1/+5
| | | | | | | | | | | DefaultBool is basically just "bool with a default constructor", so it really should implicitly convert to bool. In fact, it should convert to bool&, so that it could be passed to functions that take bools by reference. This time, mark the operator bool& as implicit to promise that it's deliberate. llvm-svn: 181908
* PPCISelLowering.h: Escape \@ in comments. [-Wdocumentation]NAKAMURA Takumi2013-05-151-14/+14
| | | | llvm-svn: 181907
* Whitespace.NAKAMURA Takumi2013-05-151-2/+2
| | | | llvm-svn: 181906
* Re-enable tests disabled due to llvm.org/pr14541Daniel Malea2013-05-153-3/+0
| | | | | | | - "platform process list" command works on Linux now - "process attach -n" (attach to process by name also works on Linux now) llvm-svn: 181905
* Implement "platform process list" on LinuxDaniel Malea2013-05-152-44/+251
| | | | | | | | | - read process information from /proc - resolves llvm.org/pr14541 :) Patch by Mike Sartain! llvm-svn: 181904
* Revert r181833: lldb prompt issue still occurs on buildbot ↵Daniel Malea2013-05-153-0/+3
| | | | | | | | (http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/4124) - maybe consider checking in the 'good' version of libedit to avoid ancient system version llvm-svn: 181903
* Disable test case that causes assertion failure on LinuxDaniel Malea2013-05-151-1/+2
| | | | | | | - filed llvm.org/pr16016 - fixed URL for llvm.org/pr16000 llvm-svn: 181902
* [objc-arc] Fixed a spelling error and made the statistic descriptions be ↵Michael Gottesman2013-05-151-5/+5
| | | | | | consistent about their usage of periods. llvm-svn: 181901
* Add missing #includeDouglas Gregor2013-05-151-0/+1
| | | | llvm-svn: 181900
* Fix cmake builds from checkouts with multiple remotesDaniel Malea2013-05-151-2/+5
| | | | | | | | - newlines from GetRepositoryPath output were interfering with ninja builds - replace newlines with spaces - remove *only* trailing spaces from repo path llvm-svn: 181899
* Support unaligned load/store on more ARM targetsDerek Schuff2013-05-151-4/+17
| | | | | | | | | | | | | | | | | This patch matches GCC behavior: the code used to only allow unaligned load/store on ARM for v6+ Darwin, it will now allow unaligned load/store for v6+ Darwin as well as for v7+ on other targets. The distinction is made because v6 doesn't guarantee support (but LLVM assumes that Apple controls hardware+kernel and therefore have conformant v6 CPUs), whereas v7 does provide this guarantee (and Linux behaves sanely). Overall this should slightly improve performance in most cases because of reduced I$ pressure. Patch by JF Bastien llvm-svn: 181897
* improve of note message and minor refactoring of my lastFariborz Jahanian2013-05-1517-22/+20
| | | | | | patch (r181847). llvm-svn: 181896
* Remove MCELFObjectTargetWriter::adjustFixupOffset hackUlrich Weigand2013-05-153-9/+0
| | | | | | | | Now that PowerPC no longer uses adjustFixupOffset, and no other back-end (ever?) did, we can remove the infrastructure itself (incidentally addressing a FIXME to that effect). llvm-svn: 181895
* [PowerPC] Remove need for adjustFixupOffst hackUlrich Weigand2013-05-154-66/+52
| | | | | | | | | | | | | | | | Now that applyFixup understands differently-sized fixups, we can define fixup_ppc_lo16/fixup_ppc_lo16_ds/fixup_ppc_ha16 to properly be 2-byte fixups, applied at an offset of 2 relative to the start of the instruction text. This has the benefit that if we actually need to generate a real relocation record, its address will come out correctly automatically, without having to fiddle with the offset in adjustFixupOffset. Tested on both 64-bit and 32-bit PowerPC, using external and integrated assembler. llvm-svn: 181894
* [SystemZ] Make use of SUBTRACT HALFWORDRichard Sandiford2013-05-155-0/+237
| | | | | | Thanks to Ulrich Weigand for noticing that this instruction was missing. llvm-svn: 181893
* [PowerPC] Add test case for r181891Ulrich Weigand2013-05-151-0/+38
| | | | llvm-svn: 181892
* [PowerPC] Correctly handle fixups of other than 4 byte sizeUlrich Weigand2013-05-151-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | The PPCAsmBackend::applyFixup routine handles the case where a fixup can be resolved within the same object file. However, this routine is currently hard-coded to assume the size of any fixup is always exactly 4 bytes. This is sort-of correct for fixups on instruction text; even though it only works because several of what really would be 2-byte fixups are presented as 4-byte fixups instead (requiring another hack in PPCELFObjectWriter::adjustFixupOffset to clean it up). However, this assumption breaks down completely for fixups on data, which legitimately can be of any size (1, 2, 4, or 8). This patch makes applyFixup aware of fixups of varying sizes, introducing a new helper routine getFixupKindNumBytes (along the lines of what the ARM back end does). Note that in order to handle fixups of size 8, we also need to fix the return type of adjustFixupValue to uint64_t to avoid truncation. Tested on both 64-bit and 32-bit PowerPC, using external and integrated assembler. llvm-svn: 181891
* [asan] disable BuiltinLongJmpTest on PowerPCKostya Serebryany2013-05-151-1/+4
| | | | llvm-svn: 181890
* Fix test breakage caused by change in clang-format.Daniel Jasper2013-05-151-2/+2
| | | | llvm-svn: 181888
* Don't put short namespace on a single line.Daniel Jasper2013-05-152-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | Before: namespace abc { class SomeClass; } namespace def { void someFunction() {} } After: namespace abc { class Def; } namespace def { void someFunction() {} } Rationale: a) Having anything other than forward declaration on the same line as a namespace looks confusing. b) Formatting namespace-forward-declaration-combinations different from other stuff is inconsistent. c) Wasting vertical space close to such forward declarations really does not affect readability. llvm-svn: 181887
* Add Jade to the list of external projects using LLVM in the release notes.Arnaud A. de Grandmaison2013-05-151-0/+14
| | | | | | Patch by: Antoine Lorence <Antoine.Lorence@insa-rennes.fr> llvm-svn: 181886
* Include also sys/wait.h in the case of a FreeBSD kernel with a glibc (Debian ↵Sylvestre Ledru2013-05-151-1/+2
| | | | | | KFreeBSD for example) llvm-svn: 181885
* Improve recognition of template definitions.Daniel Jasper2013-05-152-2/+11
| | | | | | | | | | | | | | | | | | | | | In the long run, this will probably be better fixed by a proper expression parser.. Before: template <typename F> Matcher(const Matcher<F> & Other, typename enable_if_c < is_base_of<F, T>::value && !is_same<F, T>::value > ::type * = 0) : Implementation(new ImplicitCastMatcher<F>(Other)) {} After: template <typename F> Matcher(const Matcher<F> & Other, typename enable_if_c<is_base_of<F, T>::value && !is_same<F, T>::value>::type * = 0) : Implementation(new ImplicitCastMatcher<F>(Other)) {} llvm-svn: 181884
* [SystemZ] Add more future work items to the READMERichard Sandiford2013-05-151-7/+91
| | | | | | Based on an analysis by Ulrich Weigand. llvm-svn: 181882
* [asan] fix powerpc build and one test; fix lintKostya Serebryany2013-05-155-5/+10
| | | | llvm-svn: 181881
* Better diagnostics for string initialization.Hans Wennborg2013-05-159-44/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves Clang's diagnostics for string initialization. Where it would previously say: /tmp/a.c:3:9: error: array initializer must be an initializer list wchar_t s[] = "Hi"; ^ /tmp/a.c:4:6: error: array initializer must be an initializer list or string literal char t[] = L"Hi"; ^ It will now say /tmp/a.c:3:9: error: initializing wide char array with non-wide string literal wchar_t s[] = "Hi"; ^ /tmp/a.c:4:6: error: initializing char array with wide string literal char t[] = L"Hi"; ^ As a bonus, it also fixes the fact that Clang would previously reject this valid C11 code: char16_t s[] = u"hi"; char32_t t[] = U"hi"; because it would only recognize the built-in types for char16_t and char32_t, which do not exist in C. llvm-svn: 181880
* [SystemZ] Consolidate disassembler tests for valid input into 2 big testsRichard Sandiford2013-05-15339-6714/+6953
| | | | llvm-svn: 181879
OpenPOWER on IntegriCloud