summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [SeparateConstOffsetFromGEP] make two tests more strictJingyue Wu2014-06-081-4/+4
| | | | | | | inbounds are not necessary in these two tests. zext(a +nuw b) = zext(a) + zext(b) should hold with or without inbounds. llvm-svn: 210437
* SmallVector: Improve test coverage for insert with repetitionDavid Blaikie2014-06-081-22/+18
| | | | | | | | | | | | | To test cases that involve actual repetition (> 1 elements), at least one element before the insertion point, and some elements of the original range that still fit in that range space after insertion. Actually we need coverage for the inverse case too (where no elements after the insertion point fit into the previously allocated space), but this'll do for now, and I might end up rewriting bits of SmallVector to avoid that special case anyway. llvm-svn: 210436
* ScalarEvolution: Derive element size from the type of the loaded elementTobias Grosser2014-06-082-2/+12
| | | | | | | | | | Before, we where looking at the size of the pointer type that specifies the location from which to load the element. This did not make any sense at all. This change fixes a bug in the delinearization where we failed to delinerize certain load instructions. llvm-svn: 210435
* SmallVector: More movable improvements - don't copy elements to make space ↵David Blaikie2014-06-082-14/+88
| | | | | | | | when inserting repeated elements. Also split and improve tests a bit. llvm-svn: 210433
* SmallVector: Move, don't copy, elements to make space for an insertion.David Blaikie2014-06-082-1/+40
| | | | llvm-svn: 210432
* X86: simplify data layout calculationSaleem Abdulrasool2014-06-081-3/+2
| | | | | | | | X86Subtarget::isTargetCygMing || X86Subtarget::isTargetKnownWindowsMSVC is equivalent to all Windows environments. Simplify the check to isOSWindows. NFC. llvm-svn: 210431
* SmallVectorTest: Remove some more robust checks added in r210429 since they ↵David Blaikie2014-06-081-6/+0
| | | | | | | | | | | caught some bugs I haven't fixed yet. Specifically this caused inserting an element from a SmallVector into itself when such an insertion would cause a reallocation. We have code to handle this for non-reallocating cases, but it's not robust against reallocation. llvm-svn: 210430
* Fix some more moving-from-moved-from objects issues in SmallVectorDavid Blaikie2014-06-082-2/+20
| | | | | | | | (& because it makes it easier to test, this also improves correctness/performance slightly by moving the last element in an insert operation, rather than copying it) llvm-svn: 210429
* APFloat: x - NaN needs to flip the signbit of NaN when x is a number.Stephen Canon2014-06-082-25/+27
| | | | | | Because we don't have a separate negate( ) function, 0 - NaN does double-duty as the IEEE-754 negate( ) operation, which (unlike most FP ops) *does* attach semantic meaning to the signbit of NaN. llvm-svn: 210428
* AsmMatchers: Use unique_ptr to manage ownership of MCParsedAsmOperandDavid Blaikie2014-06-0813-1119/+982
| | | | | | | | | | | | I saw at least a memory leak or two from inspection (on probably untested error paths) and r206991, which was the original inspiration for this change. I ran this idea by Jim Grosbach a few weeks ago & he was OK with it. Since it's a basically mechanical patch that seemed sufficient - usual post-commit review, revert, etc, as needed. llvm-svn: 210427
* Ensure SmallVector::insert doesn't overwrite the last element in the range ↵David Blaikie2014-06-082-1/+23
| | | | | | | | | | | | | | with the already-moved-from value This would cause the last element in a range to be in a moved-from state after an insert at a non-end position, losing that value entirely in the process. Side note: move_backward is subtle. It copies [A, B) to C-1 and down. (the fact that it decrements both the second and third iterators before the first movement is the subtle part... kind of surprising, anyway) llvm-svn: 210426
* Revert "Do materialize for floating point"Alp Toker2014-06-082-62/+2
| | | | | | | | | | | | | | | | | | | | | | | 1) The commit was made despite profound lack of understanding: "I did not understand the comment about using dyn_cast instead of isa. I will commit as is and make the update after. You can explain what you meant to me." Commit first, understand later isn't OK. 2) Review comments were simply ignored: "Can you edit the summary to describe what the patch is for? It appears to be a list of commits at the moment." 3) The patch got LGTM'd off-list without any indication of readiness. 4) The public mailing list was excluded from patch review so all of this was hidden from the community. This reverts commit r210414. llvm-svn: 210424
* Remove outdated CMake MSVC workaroundAlp Toker2014-06-081-7/+1
| | | | llvm-svn: 210421
* Remove redundant typedef from MCAsmParserSemaCallbackAlp Toker2014-06-081-2/+0
| | | | | | The last use has been removed in clang r210418. llvm-svn: 210419
* Make InlineAsmIdentifierInfo forward-declarableAlp Toker2014-06-081-16/+16
| | | | | | This helps localize header inclusion in the frontend. llvm-svn: 210417
* MC: fix text section characteristics for WoASaleem Abdulrasool2014-06-082-0/+33
| | | | | | | | | | link.exe requires that the text section has the IMAGE_SCN_MEM_16BIT flag set. Otherwise, it will treat the function as ARM. If this occurs, then jumps to the function will fail, switching from thumb to ARM mode execution. With this change, it is possible to link using the MSVC linker as well. llvm-svn: 210415
* Do materialize for floating pointReed Kotler2014-06-082-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: start to do simple constants finish simplestore add test case format Merge branch 'master' into 1756_8 Add basic functionality for assignment of ints. This creates a lot of core infrastructure in which to add, with little effort, quite a bit more to mips fast-isel Merge branch 'master' into 1756_8 Add basic functionality for assignment of ints. This creates a lot of core infrastructure in which to add, with little effort, quite a bit more to mips fast-isel in progress finish integer materialize test cases test cases in progress Finish up fast-isel materialize for ints. Finish materialize for ints test cases simplestorei.ll Merge branch 'master' into 1756_8 fix fp constants for fast-isel Merge branch '1758_1' of dmz-portal.mips.com:llvm into 1758_1 in progress lastest for fp materialization clean up Merge branch 'master' into 1758_1 formatting add test case finish test case Merge branch 'master' into 1758_2 Test Plan: simplestore.ll simplestore.ll Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3659 llvm-svn: 210414
* start to clean up buildMI calls in mips fast-iselReed Kotler2014-06-081-26/+24
| | | | | | | | | | | | | | | | | Summary: Merge branch 'master' into 1758_6 Test Plan: No functionality change. Run "make check" and run test-suite. Because our servers are not yet running again I have not yet run test-suite. I will further review myself before submission. Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3819 llvm-svn: 210413
* Re-enable ARM ELF testsAlp Toker2014-06-081-3/+3
| | | | | | r210408 inadvertently disabled them when X86 is not selected. llvm-svn: 210412
* Fix build when no native target is enabledAlp Toker2014-06-081-3/+4
| | | | | | | The JITTests and MCJITTests unit test targets require a native arch with JIT support, otherwise fail to link. llvm-svn: 210411
* include MipsGenFastISel.incReed Kotler2014-06-081-5/+17
| | | | | | | | | | | | | | | | | | Summary: Included this file which is needed to enable tablegen generated functionality for fast mips-isel Test Plan: This has no visible functionality by itself but just adding the include file creates some issues so I have it as a separate patch. Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3812 llvm-svn: 210410
* test: add test case for SVN r210406Saleem Abdulrasool2014-06-081-0/+12
| | | | | | Add missing test case for constructor section selection. Thanks David Blaikie! llvm-svn: 210409
* test: move some tests into ARM directorySaleem Abdulrasool2014-06-083-0/+4
| | | | | | | | | | Rather than requiring ARM support for the ELF tests (which is odd), move the tests that require ARM into a subdirectory to use lit to disable them if the support is not present. Play this game to prevent disabling the ELF tests on the Windows build bots as they have caught issues in the past with interactions between various platforms. llvm-svn: 210408
* MC: make ELF .type handling more GNU AS compatibleSaleem Abdulrasool2014-06-085-38/+115
| | | | | | | | | | | | | | GAS documents the .type directive as having an optional comma following the key symbol name when using the STT_<TYPE_IN_UPPER_CASE> form. However, it treats the comma as optional in all cases. This makes the IAS support both forms of inputs. Furthermore, the prefixed forms take either the upper case name or the lower case alias. The tests are split into two separate sets as the hash character serves as a comment character on x86, which is tested in the second set by using arm-elf which uses the at symbol as a comment character. llvm-svn: 210407
* MC: fix ctor/dtor section for windows-itaniumSaleem Abdulrasool2014-06-081-1/+1
| | | | | | | | This adjusts the section setup for the windows-itanium environment. This environment does not report to be a known windows msvc environment, even though it is (nearly) identical to the MSVC environment for C code. llvm-svn: 210406
* MC: whitespace, grouping for COFF section setupSaleem Abdulrasool2014-06-081-26/+33
| | | | | | | | Add some whitespace, combine two sequential conditionals into a single one. Reformat some section definitions to maintain uniformity in the function. NFC. llvm-svn: 210405
* Fix typosAlp Toker2014-06-076-8/+8
| | | | llvm-svn: 210401
* Build fix: remove initializeJumpInstrTablesPass() call from LTOAlp Toker2014-06-071-1/+0
| | | | | | | | | | | | | | | This was incurring an unsatisfied dependency on CodeGen from LTO breaking shared builds: Undefined symbols for architecture x86_64: "llvm::initializeJumpInstrTablesPass(llvm::PassRegistry&)", referenced from: llvm::LTOCodeGenerator::initializeLTOPasses() in LTOCodeGenerator.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Removed as a temporary measure pending feedback from the author. llvm-svn: 210400
* ARM: correct assertion for long-calls on WoASaleem Abdulrasool2014-06-072-2/+21
| | | | | | | | | | | COFF/PE, so the relocation model is never static. Loosen the assertion accordingly. The relocation can still be emitted properly, as it will be converted to an IMAGE_REL_ARM_ADDR32 which will be resolved by the loader taking the base relocation into account. This is necessary to permit the emission of long calls which can be controlled via the -mlong-calls option in the driver. llvm-svn: 210399
* tools: add a high level explanation for WoA EH dataSaleem Abdulrasool2014-06-071-21/+81
| | | | | | | | | | | | Add a brief explanation of the data section layout for the unwind data that the Windows on ARM EH models. This is simply to provide a rough idea of the layout of the code involved in the decoding of the unwinding. Details on the involved data structures are available in the associated support header. The bulk of it is related to printing out the byte-code to help validate generation of WoA EH. No functional change. llvm-svn: 210397
* [OCaml] Commit missing parts of r210395Peter Zotov2014-06-071-1/+1
| | | | llvm-svn: 210396
* [OCaml] Introduce an llmdkind abstract type.Peter Zotov2014-06-072-7/+11
| | | | | | | | | Patch by Gabriel Radanne. While this commit technically breaks API, no code should have supplied the integer IDs directly, and thus no code should break. llvm-svn: 210395
* Revert 209903 and 210040.Rafael Espindola2014-06-072-56/+0
| | | | | | | | | | | | The messages were "PR19753: Optimize comparisons with "ashr exact" of a constanst." "Added support to optimize comparisons with "lshr exact" of a constant." They were not correctly handling signed/unsigned operation differences, causing pr19958. llvm-svn: 210393
* Fix the MachineScheduler's logic for updating ready times for in-order.Andrew Trick2014-06-072-34/+27
| | | | | | | | | | | | | | | | | Now the scheduler updates a node's ready time as soon as it is scheduled, before releasing dependent nodes. There was a reason I didn't do this initially but it no longer applies. A53 is in-order and was running into an issue where nodes where added to the readyQ too early. That's now fixed. This also makes it easier for custom scheduling strategies to build heuristics based on the actual cycles that the node was scheduled at. The only impact on OOO (sandybridge/cyclone) is that ready times will be slightly more accurate. I didn't measure any significant regressions. llvm-svn: 210390
* Replace the use of TargetMachine with a tiny bool variable.Eric Christopher2014-06-063-8/+6
| | | | llvm-svn: 210386
* Remove all local variables from X86SelectionDAGInfo, the DAG hasEric Christopher2014-06-063-35/+29
| | | | | | all of the ones we were stashing away on startup. llvm-svn: 210385
* ADT: introduce isWindowsItaniumEnvironmentSaleem Abdulrasool2014-06-061-0/+4
| | | | | | | | Add an isWindowsItaniumEnvironment function to Triple to mirror the other Windows environments. This is simply a utility function to check if we are targeting windows-itanium rather than windows-msvc. llvm-svn: 210383
* DebugInfo: Use the scope of the function declaration, if any, to name a ↵David Blaikie2014-06-065-12/+14
| | | | | | | | | | function in DWARF pubnames This ensures that member functions, for example, are entered into pubnames with their fully qualified name, rather than inside the global namespace. llvm-svn: 210379
* DebugInfo: pubnames: include file-local (static or anonymous namespace) ↵David Blaikie2014-06-065-75/+200
| | | | | | | | | variables and anonymous namespaces themselves. Still some issues with name qualification, FIXMEs added to test cases and fixes will come next. llvm-svn: 210378
* InstCombine: Canonicalize addrspacecast between different element typesJingyue Wu2014-06-065-17/+125
| | | | | | | | | | | | | | | | addrspacecast X addrspace(M)* to Y addrspace(N)* --> bitcast X addrspace(M)* to Y addrspace(M)* addrspacecast Y addrspace(M)* to Y addrspace(N)* Updat all affected tests and add several new tests in addrspacecast.ll. This patch is based on http://reviews.llvm.org/D2186 (authored by Matt Arsenault) with fixes and more tests. llvm-svn: 210375
* MC: prevent early DCE of empty sectionsSaleem Abdulrasool2014-06-0611-63/+76
| | | | | | | | | | | | | | | | Prevent the early elimination of sections in the object writer. There may be references to the section itself by other symbols, which may potentially not be possible to resolve. ML (Visual Studio's Macro Assembler) also seems to retain empty sections. The elimination of symbols and sections which are unused should really occur at the link phase. This will not cause any change in the resulting binary, simply in the generated object files. The adjustments to the other unit tests account for the fluctuating section index caused by the appearance of sections which were previously discarded. llvm-svn: 210373
* X86: Don't turn shifts into ands if there's another use that may not check ↵Benjamin Kramer2014-06-062-1/+14
| | | | | | | | for equality. Fixes PR19964. llvm-svn: 210371
* Fix a few issues with comdat handling on COFF.Rafael Espindola2014-06-0617-184/+138
| | | | | | | | | | | | | | | | | | | | | * Section association cannot use just the section name as many sections can have the same name. With this patch, the comdat symbol in an assoc section is interpreted to mean a symbol in the associated section and the mapping is discovered from it. * Comdat symbols were not being set correctly. Instead we were getting whatever was output first for that section. A consequence is that associative sections now must use .section to set the association. Using .linkonce would not work since it is not possible to change a sections comdat symbol (it is used to decide if we should create a new section or reuse an existing one). This includes r210298, which was reverted because it was asserting on an associated section having the same comdat as the associated section. llvm-svn: 210367
* Have TargetSelectionDAGInfo take a DataLayout initializer rather thanEric Christopher2014-06-0613-22/+16
| | | | | | a TargetMachine since the only thing it wants is DataLayout. llvm-svn: 210366
* Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-061-24/+24
| | | | | | | | | | | | | | | | | These checks were accidentally skipping the 0x prefix in the hex offsets, then cunningly ignoring the prefix in the use of those captured values. Except in the case of the unit length, where the match was only matching the leading '0' before the x in the 0x prefix, then matching that against the length. We can't actually express the length association here, as the length field in the Compile Unit header does not include the length field itself, but the length field in the pubnames section /does/ include the size of the length field in the Compile Unit header - so the two numbers are actually 4 bytes different. Just skip matching that. llvm-svn: 210364
* Fix a typo made in Programmer's Manual made in r210354. SpottedDan Liew2014-06-061-1/+1
| | | | | | by Paul Robinson. llvm-svn: 210363
* Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-061-88/+1
| | | | | | | | | | | | | | | | | This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4 and data4 in DWARF3 and below. Since then we've updated DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway. Granted this still differs between DWARF 3 and DWARF 4 (FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile testing that codepath again here. It's covered adequately in many other test cases. And while I'm here, don't hardcode the byte size of the compile unit - it's not relevant to this test and just makes it brittle if/when anything changes in the way this CU is emitted. llvm-svn: 210362
* Fixed a bug in lowering shuffle_vectors to insertpsFilipe Cabecinhas2014-06-063-11/+35
| | | | | | | | | | | | | | Summary: We were being too strict and not accounting for undefs. Added a test case and fixed another one where we improved codegen. Reviewers: grosbach, nadav, delena Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4039 llvm-svn: 210361
* Mention the IRBuilder in Programmer's Manual with a few small examples.Dan Liew2014-06-061-1/+36
| | | | llvm-svn: 210354
* Fix typo in a test from r210342.Michael Zolotukhin2014-06-061-1/+1
| | | | llvm-svn: 210343
OpenPOWER on IntegriCloud