summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move MCSymbol Value in to the union of Offset and CommonSize.Pete Cooper2015-06-092-12/+40
| | | | | | | | | It wasn't possible to have a variable Symbol with offset or 'isCommon' so this just enables better packing of the MCSymbol class. Reviewed by Rafael Espindola. llvm-svn: 239440
* [RegisterScavenger] Fix handling of predicated instructionsTobias Edler von Koch2015-06-091-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The RegisterScavenger explicitly ignores <kill> flags on operands of predicated instructions and therefore assumes that such registers remain live. When it then scavenges such a register, it inserts a spill of this (killed) register. This is invalid code and gets flagged up by the verifier. Nowadays kill flags are set correctly on predicated instructions. This patch makes the Scavenger respect them. The bug has so far only been triggered by an internal pass, so I don't have a test case unfortunately. Fixes PR23119. Reviewers: hfinkel, tobiasvk_caf Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9039 llvm-svn: 239439
* [BasicBlockUtils] Set debug locations for instructions created in ↵Alexey Samsonov2015-06-093-4/+95
| | | | | | | | | | | | | | SplitBlockPredecessors. Test Plan: regression test suite Reviewers: eugenis, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10343 llvm-svn: 239438
* Move dllimport name mangling to IR mangler.Peter Collingbourne2015-06-097-32/+25
| | | | | | | | This ensures that LTO clients see the correct external symbol name. Differential Revision: http://reviews.llvm.org/D10318 llvm-svn: 239437
* COFF: Implement /lib using LibDriver.Peter Collingbourne2015-06-092-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D10347 llvm-svn: 239436
* [NVPTX] fix a crash bug in NVPTXFavorNonGenericAddrSpacesJingyue Wu2015-06-092-54/+82
| | | | | | | | | | | | | | | | | | | | | | Summary: We used to assume V->RAUW only modifies the operand list of V's user. However, if V and V's user are Constants, RAUW may replace and invalidate V's user entirely. This patch fixes the above issue by letting the caller replace the operand instead of calling RAUW on Constants. Test Plan: @nested_const_expr and @rauw in access-non-generic.ll Reviewers: broune, jholewinski Reviewed By: broune, jholewinski Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D10345 llvm-svn: 239435
* LibDriver, llvm-lib: introduce.Peter Collingbourne2015-06-0916-10/+270
| | | | | | | | | | llvm-lib is intended to be a lib.exe compatible utility that also understands bitcode. The implementation lives in a library so that lld can use it to implement /lib. Differential Revision: http://reviews.llvm.org/D10297 llvm-svn: 239434
* [WinEH] Add 32-bit SEH state table emission prototypeReid Kleckner2015-06-0911-29/+446
| | | | | | | | | | | | This gets all the handler info through to the asm printer and we can look at the .xdata tables now. I've convinced one small catch-all test case to work, but other than that, it would be a stretch to say this is functional. The state numbering algorithm avoids doing any scope reconstruction as we do for C++ to simplify the implementation. llvm-svn: 239433
* [AArch64] Remove an overly conservative check when generating store pairs.Chad Rosier2015-06-092-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Store instructions do not modify register values and therefore it's safe to form a store pair even if the source register has been read in between the two store instructions. Previously, the read of w1 (see below) prevented the formation of a stp. str w0, [x2] ldr w8, [x2, #8] add w0, w8, w1 str w1, [x2, #4] ret We now generate the following code. stp w0, w1, [x2] ldr w8, [x2, #8] add w0, w8, w1 ret All correctness tests with -Ofast on A57 with Spec200x and EEMBC pass. Performance results for SPEC2K were within noise. llvm-svn: 239432
* Use AlignOf traits to enable static_assert.Pete Cooper2015-06-091-3/+3
| | | | | | This is better than runtime asserts. Thanks to David Blaikie for the help here. llvm-svn: 239431
* Replace loop with std::equal. NFC intended.Benjamin Kramer2015-06-091-7/+1
| | | | llvm-svn: 239430
* Reduce duplication in MCSymbol Name handling. NFC>Pete Cooper2015-06-092-8/+7
| | | | | | | | | | | | | Based on feedback to r239428 by David Blaikie, use const_cast to reduce duplication of the const and non-const versions of getNameEntryPtr. Also have that method return the pointer to the name directly instead of users having to then get the name from the union. Finally, add a FIXME that we should use a static_assert once available in the new operator. llvm-svn: 239429
* Make MCSymbol::Name be a union of uint64_t and a pointer.Pete Cooper2015-06-092-15/+27
| | | | | | | | | This should hopefully fix the 32-bit bots which were allocating space for a pointer but needed to be aligned to 64-bits. Now we allocate enough space for a uint64_t and a pointer and cast to the appropriate storage llvm-svn: 239428
* Remove DisableTailCalls from TargetOptions and the code in resetTargetOptionsAkira Hatanaka2015-06-0910-17/+106
| | | | | | | | | | | | | | | | | | | | | | | | | that was resetting it. Remove the uses of DisableTailCalls in subclasses of TargetLowering and use the value of function attribute "disable-tail-calls" instead. Also, unconditionally add pass TailCallElim to the pipeline and check the function attribute at the start of runOnFunction to disable the pass on a per-function basis. This is part of the work to remove TargetMachine::resetTargetOptions, and since DisableTailCalls was the last non-fast-math option that was being reset in that function, we should be able to remove the function entirely after the work to propagate IR-level fast-math flags to DAG nodes is completed. Out-of-tree users should remove the uses of DisableTailCalls and make changes to attach attribute "disable-tail-calls"="true" or "false" to the functions in the IR. rdar://problem/13752163 Differential Revision: http://reviews.llvm.org/D10099 llvm-svn: 239427
* Attach attribute "disable-tail-calls" to the functions in the IR.Akira Hatanaka2015-06-096-12/+23
| | | | | | | | | | | This commit adds back the code that seems to have been dropped unintentionally in r176985. rdar://problem/13752163 Differential Revision: http://reviews.llvm.org/D10100 llvm-svn: 239426
* [bpf] enable BPF backend in autoconf buildAlexei Starovoitov2015-06-092-5/+7
| | | | llvm-svn: 239425
* Change from alignof to llvm::alignOf to appease Visual StudioPete Cooper2015-06-091-2/+2
| | | | llvm-svn: 239424
* Allocate space for MCSymbol::Name only if required.Pete Cooper2015-06-093-13/+66
| | | | | | | | | | | | | | Similarly to User which allocates a number of Use's prior to the this pointer, allocate space for the Name* for MCSymbol only when we need a name. Given that an MCSymbol is 48-bytes on 64-bit systems, this saves a decent % of space. Given the verify_uselistorder test case with debug info and llc, 50k symbols have names out of 700k so this optimises for the common case of temporary unnamed symbols. Reviewed by David Blaikie. llvm-svn: 239423
* MergeFunctions: Don't replace a weak function use by another equivalent weak ↵Arnold Schwaighofer2015-06-092-24/+52
| | | | | | | | | | function We don't know whether the weak functions definition is the definitive definition. rdar://21303727 llvm-svn: 239422
* [ItaniumMangle] Mangle long double as __float128 for some Power targetsDavid Majnemer2015-06-094-1/+25
| | | | | | | | | | GCC mangles long double like __float128 in order to support compatibility with ABI variants which had a different interpretation of long double. This fixes PR23791. llvm-svn: 239421
* Revert "[DWARF] Fix a few corner cases in expression emission"David Blaikie2015-06-094-143/+9
| | | | | | | This reverts commit r239380 due to apparently GDB regressions: http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/22562 llvm-svn: 239420
* Rename `FileSpec::IsRelativeToCurrentWorkingDirectory` to `IsRelative`.Chaoren Lin2015-06-098-15/+30
| | | | | | | | | | | | | | | | | Summary: `IsRelativeToCurrentWorkingDirectory` was misleading, because relative paths are sometimes appended to other directories, not just the cwd. Plus, the new name is shorter. Also added `IsAbsolute` for completeness. Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10262 llvm-svn: 239419
* COFF: Split SymbolTable::addCombinedLTOObject. NFC.Rui Ueyama2015-06-092-30/+42
| | | | llvm-svn: 239418
* Revert "Re-land r236052, "[SEH] Add 32-bit lowering code for __try""Reid Kleckner2015-06-098-278/+153
| | | | | | | This reverts commit r239415. This was committed accidentally, LLVM isn't ready for this. llvm-svn: 239417
* Disable style-on-command-line test on WindowsReid Kleckner2015-06-091-0/+4
| | | | llvm-svn: 239416
* Re-land r236052, "[SEH] Add 32-bit lowering code for __try"Reid Kleckner2015-06-098-153/+278
| | | | | | | | This reverts r236167. LLVM should be ready for this now. llvm-svn: 239415
* XFail pexpect tests for Windows hosts.Chaoren Lin2015-06-096-35/+44
| | | | | | | | | | Reviewers: vharron, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10340 llvm-svn: 239414
* COFF: Update comment.Rui Ueyama2015-06-091-1/+2
| | | | llvm-svn: 239413
* The constant initialization for globals in NVPTX is generated as an Samuel Antao2015-06-092-9/+56
| | | | | | | | | | array of bytes. The generation of this byte arrays was expecting the host to be little endian, which prevents big endian hosts to be used in the generation of the PTX code. This patch fixes the problem by changing the way the bytes are extracted so that it works for either little and big endian. llvm-svn: 239412
* Add more wrappers for symbol APIs to the C API.Eli Bendersky2015-06-092-0/+27
| | | | | | | | | | | This represents some of the functionality we expose in the llvmlite Python binding. Patch by Antoine Pitrou Differential Revision: http://reviews.llvm.org/D10222 llvm-svn: 239411
* [bpf] make BPF backend non-experimentalAlexei Starovoitov2015-06-091-0/+1
| | | | | | | | | only cmake build change. autoconf build and docs will follow email thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-June/thread.html#86523 llvm-svn: 239410
* Remove object_error::success and use std::error_code() insteadRui Ueyama2015-06-0919-126/+125
| | | | | | | | | | | | make_error_code(object_error) is slow because object::object_category() uses a ManagedStatic variable. But the real problem is that the function is called too frequently. This patch uses std::error_code() instead of object_error::success. In most cases, we return "success", so this patch reduces number of function calls to that function. http://reviews.llvm.org/D10333 llvm-svn: 239409
* [PowerPC] Reformat altivec.h with clang-formatBill Seurer2015-06-091-7361/+4978
| | | | | | This revision just fixes the formatting of altivec.h. llvm-svn: 239408
* Move target-specific Sema test to its own file.Jonathan Roelofs2015-06-092-6/+9
| | | | | | Fixing the build-break introduced in r239406. llvm-svn: 239407
* Fix printing of GCCAsmExprs with input or output arguments.Jonathan Roelofs2015-06-092-2/+10
| | | | | | Patch by Nick Sumner! llvm-svn: 239406
* Recommit "[mips] [IAS] Restore STI.FeatureBits in .set pop." (r239144).Toma Tabacu2015-06-094-12/+44
| | | | | | | Specified the llvm namespace for the 2 calls to make_unique() which caused compilation errors in Visual Studio 2013. llvm-svn: 239405
* clang-format: Support //!-comments, increase test coverage.Daniel Jasper2015-06-092-1/+19
| | | | llvm-svn: 239404
* X86-MPX: Implemented encoding for MPX instructions.Elena Demikhovsky2015-06-097-3/+121
| | | | | | Added encoding tests. llvm-svn: 239403
* Remove rm invocations where the file is immediately rewritten later.Benjamin Kramer2015-06-091-3/+1
| | | | | | | This may or may not help making this test less flaky on windows. There's a race condition in lit somewhere. llvm-svn: 239402
* Remove unused diagnostics.Benjamin Kramer2015-06-092-6/+2
| | | | | | | -Wreceiver-is-weak is unused but should be ignored, move it to the list of diagnostic groups. llvm-svn: 239401
* Removing spurious semi colons; NFC.Aaron Ballman2015-06-093-3/+3
| | | | llvm-svn: 239400
* Removing spurious semi colons; NFC.Aaron Ballman2015-06-093-3/+3
| | | | llvm-svn: 239399
* clang-format: [JS] Hotfix for runtime issue with deeply nested JS code.Daniel Jasper2015-06-092-3/+7
| | | | | | | | | | | | | | I have not succeeded in writing a proper test case for this yet and we also need to solve the underlying fundamental problem of trying too many combinations with nested blocks (basically this somewhat works around our Dijkstra algorithm). Preventing this linebreak is good anyways as usually the penalties never make us choose it (that's why I can't create a test) and it also looks ugly. Also cleaned up state comparison code that I discovered while hunting this down. llvm-svn: 239398
* Revert "[mips] [IAS] Add support for BNE and BEQ with an immediate operand." ↵Toma Tabacu2015-06-096-219/+2
| | | | | | | | (r239396). It was breaking buildbots. llvm-svn: 239397
* [mips] [IAS] Add support for BNE and BEQ with an immediate operand.Toma Tabacu2015-06-096-2/+219
| | | | | | | | | | | | | | | | Summary: For some branches, GAS accepts an immediate instead of the 2nd register operand. We only implement this for BNE and BEQ for now. Other branch instructions can be added later, if needed. Reviewers: dsanders Reviewed By: dsanders Subscribers: seanbruno, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D9666 llvm-svn: 239396
* [nvptx] Only support the 'm' inline assembly memory constraint. NFC.Daniel Sanders2015-06-091-6/+0
| | | | | | | | | | | | | | | | | | Summary: NVPTX doesn't seem to support any additional constraints. Therefore remove the target hook. No functional change intended. Reviewers: jholewinski Reviewed By: jholewinski Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D8209 llvm-svn: 239395
* [lldb-server][MIPS64] Assigning generic register numbers in register info ↵Sagar Thakur2015-06-091-7/+7
| | | | | | | | for mips64 Use generic register numbers for argument registers, fp, ra and flag register in register info. llvm-svn: 239394
* clang-cl: Ignore the /o option when /P is specified.Greg Bedwell2015-06-092-15/+7
| | | | | | | | | This matches the cl.exe behavior (tested with 18.00.31101). In order to specify an output file for /P, use the /Fi option instead. Differential Revision: http://reviews.llvm.org/D10313 llvm-svn: 239393
* [ADT] Assert that SmallVectorBase::grow_pod() successfully reallocates memory.Daniel Sanders2015-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: If malloc/realloc fails then the SmallVector becomes unusable since begin() and end() will return NULL. This is unlikely to occur but was the cause of recent bugpoint test failures on my machine. It is not clear whether not checking for malloc/realloc failure is a deliberate decision and adding checks has the potential to impact compiler performance. Therefore, this patch only adds the check to builds with assertions enabled for the moment. Reviewers: bkramer Reviewed By: bkramer Subscribers: bkramer, llvm-commits Differential Revision: http://reviews.llvm.org/D9520 llvm-svn: 239392
* MergeFunctions: Fix gcc warning in conditionDenis Protivensky2015-06-091-2/+2
| | | | llvm-svn: 239391
OpenPOWER on IntegriCloud