summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Fix passing of small structures for big-endian O32.Daniel Sanders2014-12-022-0/+57
| | | | | | | | | | | | | | | | | | | Summary: Like N32/N64, they must be passed in the upper bits of the register. The new code could be merged with the existing if-statements but I've refrained from doing this since it will make porting the O32 implementation to tablegen harder later. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6463 llvm-svn: 223148
* Introduce CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu ↵Roman Divacky2014-12-023-0/+33
| | | | | | | | | | parsing. Previously .cpu directive in ARM assembler didnt switch to the new CPU and therefore acted as a nop. This implemented real action for .cpu and eg. allows to assembler FreeBSD kernel with -integrated-as. llvm-svn: 223147
* Make checkout isl script executableTobias Grosser2014-12-021-0/+0
| | | | llvm-svn: 223146
* Simplify Symbolizer::SymbolizePC() interface.Alexey Samsonov2014-12-0219-236/+269
| | | | | | | | | | | Return a linked list of AddressInfo objects, instead of using an array of these objects as an output parameter. This simplifies the code in callers of this function (especially TSan). Fix a few memory leaks from internal allocator, when the returned AddressInfo objects were not properly cleared. llvm-svn: 223145
* R600/SI: Refactor AMDGPUAsmPrinter::EmitProgramInfoSI()Tom Stellard2014-12-021-9/+11
| | | | llvm-svn: 223144
* [Statepoints 4/4] Statepoint infrastructure for garbage collection: ↵Philip Reames2014-12-021-0/+209
| | | | | | | | | | | | | Documentation This is the fourth and final patch in the statepoint series. It contains the documentation for the statepoint intrinsics and their usage. There's definitely still room to improve the documentation here, but I wanted to get this landed so it was available for others. There will likely be a series of small cleanup changes over the next few weeks as we work to clarify and revise the documentation. If you have comments or questions, please feel free to discuss them either in this commit thread, the original review thread, or on llvmdev. Comments are more than welcome. Reviewed by: atrick, ributzka Differential Revision: http://reviews.llvm.org/D5683 llvm-svn: 223143
* Appease a build bot complaining about an unused variable that's used in an ↵Philip Reames2014-12-021-0/+1
| | | | | | assertion. llvm-svn: 223142
* Drop Cloog supportJohannes Doerfert2014-12-02132-8031/+184
| | | | | | | | | This commit drops the Cloog support for Polly. The scripts and documentation are changed to only use isl as prerequisity. In the code all Cloog specific parts have been removed and all relevant tests have been ported to the isl backend when it was created. llvm-svn: 223141
* Make le64 DescriptionString consistent with other targets.JF Bastien2014-12-021-1/+1
| | | | | | | | | | | | | | | Summary: In particular, remove the defaults and reorder fields so it matches the result of DataLayout::getStringDescription(). Change by David Neto. Reviewers: dschuff, sdt Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6482 llvm-svn: 223140
* cmake: Remove MAXPATHLEN define as autoconf does not provide itReid Kleckner2014-12-022-7/+0
| | | | | | | | Presumably it was added to the CMake system when MAXPATHLEN was still used by code built for Windows. Currently only lib/Support/Path.inc uses MAXPATHLEN, and it should be available on all Unices. llvm-svn: 223139
* Remove '#undef const' from config.h.cmake to sync with autoconfReid Kleckner2014-12-021-3/+0
| | | | | | | This define was removed from config.h.in when Rafael removed our use of libtool. llvm-svn: 223138
* [Statepoints 3/4] Statepoint infrastructure for garbage collection: ↵Philip Reames2014-12-0214-0/+1345
| | | | | | | | | | | | | | | | | | SelectionDAGBuilder This is the third patch in a small series. It contains the CodeGen support for lowering the gc.statepoint intrinsic sequences (223078) to the STATEPOINT pseudo machine instruction (223085). The change also includes the set of helper routines and classes for working with gc.statepoints, gc.relocates, and gc.results since the lowering code uses them. With this change, gc.statepoints should be functionally complete. The documentation will follow in the fourth change, and there will likely be some cleanup changes, but interested parties can start experimenting now. I'm not particularly happy with the amount of code or complexity involved with the lowering step, but at least it's fairly well isolated. The statepoint lowering code is split into it's own files and anyone not working on the statepoint support itself should be able to ignore it. During the lowering process, we currently spill aggressively to stack. This is not entirely ideal (and we have plans to do better), but it's functional, relatively straight forward, and matches closely the implementations of the patchpoint intrinsics. Most of the complexity comes from trying to keep relocated copies of values in the same stack slots across statepoints. Doing so avoids the insertion of pointless load and store instructions to reshuffle the stack. The current implementation isn't as effective as I'd like, but it is functional and 'good enough' for many common use cases. In the long term, I'd like to figure out how to integrate the statepoint lowering with the register allocator. In principal, we shouldn't need to eagerly spill at all. The register allocator should do any spilling required and the statepoint should simply record that fact. Depending on how challenging that turns out to be, we may invest in a smarter global stack slot assignment mechanism as a stop gap measure. Reviewed by: atrick, ributzka llvm-svn: 223137
* This patch fixes a crash involving use of predefinedFariborz Jahanian2014-12-022-2/+36
| | | | | | | | expressions. It fixes crash when mangling name for block's helper function used inside a constructor/destructor. rdar://19065361. llvm-svn: 223136
* [SwitchLowering] Handle destinations on multiple phi instructionsBruno Cardoso Lopes2014-12-022-2/+5
| | | | | | | | | Follow up from r222926. Also handle multiple destinations from merged cases on multiple and subsequent phi instructions. rdar://problem/19106978 llvm-svn: 223135
* Skip some unnecessary type checks.Samuel Benzaquen2014-12-022-11/+31
| | | | | | | | | | | | | | | | | | | | Summary: Skip some unnecessary type checks wrt DynTypedNodes. Add DynTypedNode::getUnchecked() to skip the runtime check when the type is known. Speed up DynTypedNode::operator== by using isSame() instead of isBaseOf(). Skip the type check in MatcherInterface<T>::matches(). All calls come from DynTypedMatcher::matches(), which already did the type check. This change speeds up our clang-tidy benchmark by ~4%. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6468 llvm-svn: 223134
* [MachineCSE] Clear kill-flag on registers imp-def'd by the CSE'd instruction.Ahmed Bougacha2014-12-022-0/+57
| | | | | | | | | | | | | | | | | | | Go through implicit defs of CSMI and MI, and clear the kill flags on their uses in all the instructions between CSMI and MI. We might have made some of the kill flags redundant, consider: subs ... %NZCV<imp-def> <- CSMI csinc ... %NZCV<imp-use,kill> <- this kill flag isn't valid anymore subs ... %NZCV<imp-def> <- MI, to be eliminated csinc ... %NZCV<imp-use,kill> Since we eliminated MI, and reused a register imp-def'd by CSMI (here %NZCV), that register, if it was killed before MI, should have that kill flag removed, because it's lifetime was extended. Also, add an exhaustive testcase for the motivating example. Reviewed by: Juergen Ributzka <juergen@apple.com> llvm-svn: 223133
* Remove unneccessary code introduced with 223101.Philip Reames2014-12-021-10/+2
| | | | llvm-svn: 223132
* Disable warning 4530 for MSVC builds.Zachary Turner2014-12-021-0/+4
| | | | | | | | | | We compile with exceptions off for LLVM and all other LLVM subprojects, so this brings parity to LLD and disables this warning. Reviewed by: Rui Ueyama llvm-svn: 223131
* R600/SI: Set correct number of user sgprs for HSA runtimeTom Stellard2014-12-021-1/+4
| | | | | | We don't support scratch buffers yet with HSA. llvm-svn: 223130
* [OCaml] Add Llvm.mdnull.Peter Zotov2014-12-023-0/+9
| | | | | | Patch by Gideon Smeding <gideon.smeding@3ds.com>. llvm-svn: 223129
* libc++: support NaCl when building thread.cppJF Bastien2014-12-021-4/+4
| | | | | | | | | | | | | | Summary: NaCl shouldn't include sysctl.h when trying to determine std::thread::hardware_concurrency, it should instead use sysconf(_SC_NPROCESSORS_ONLN) through unistd.h. No test needs to be changed, since hardware_concurrency.pass.cpp already tests that std::thread::hardware_concurrency > 0. Test Plan: make check-libcxx Reviewers: dschuff, danalbert Subscribers: jfb, cfe-commits Differential Revision: http://reviews.llvm.org/D6470 llvm-svn: 223128
* fix typo in commentSanjay Patel2014-12-021-1/+1
| | | | llvm-svn: 223127
* AArch64: make register block rules apply to vector types too.Tim Northover2014-12-022-3/+101
| | | | | | | | The blocking code originated in ARM, which is more aggressive about casting types to a canonical representative before doing anything else, so I missed out most vector HFAs and broke the ABI. This should fix it. llvm-svn: 223126
* R600/SI: Set the ATC bit on all resource descriptors for the HSA runtimeTom Stellard2014-12-027-9/+45
| | | | llvm-svn: 223125
* Triple: Add AMDHSA operating system typeTom Stellard2014-12-022-1/+4
| | | | | | | | This operating system type represents the AMD HSA runtime, and will be required by the R600 backend in order to generate correct code for this runtime. llvm-svn: 223124
* Fix invalid calling convention used for libcalls on ARM.Anton Korobeynikov2014-12-026-9/+60
| | | | | | | | | | | | | | | | ARM ABI specifies that all the libcalls use soft FP ABI (even hard FP binaries). These days clang emits _mulsc3 / _muldc3 calls with default (C) calling convention which would be translated into AAPCS_VFP LLVM calling and thus the result of complex multiplication will be bogus. Introduce a way for a target to specify explicitly calling convention for libcalls. Right now this is temporary correctness fix. Ultimately, we'll end with intrinsic for complex multiplication and all calling convention decisions for libcalls will be put into backend. llvm-svn: 223123
* [Tsan] Fix the atomic_race.cc test to pass on systems with high loadsViktor Kutuzov2014-12-021-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D6478 llvm-svn: 223122
* [Tsan] Do not flush all streams on exitViktor Kutuzov2014-12-021-6/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D6462 llvm-svn: 223121
* Reverted r223114, it caused failure on on clang-native-arm-cortex-a9.Serge Pavlov2014-12-028-115/+2
| | | | llvm-svn: 223120
* [LICM] Avoind store sinking if no preheader is availableBruno Cardoso Lopes2014-12-022-2/+37
| | | | | | | | | Load instructions are inserted into loop preheaders when sinking stores and later removed if not used by the SSA updater. Avoid sinking if the loop has no preheader and avoid crashes. This fixes one more side effect of not handling indirectbr instructions properly on LoopSimplify. llvm-svn: 223119
* clang-format: Escape '*' in generated flag documentation.Daniel Jasper2014-12-022-1/+2
| | | | llvm-svn: 223118
* clang-format: Add option to suppress operator alignment.Daniel Jasper2014-12-026-8/+96
| | | | | | | | | | | | | | | | With alignment: int aaaaaa = aa + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb * cccccccccccccccccccccccccccccccc; Without alignment: int aaaaaa = aa + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb * cccccccccccccccccccccccccccccccc; This fixes llvm.org/PR21666. llvm-svn: 223117
* [NVPTX] Fix type error for some builtins in BuiltinsNVPTX.defJustin Holewinski2014-12-022-15/+17
| | | | llvm-svn: 223116
* Remove unused function.Asiri Rathnayake2014-12-022-12/+0
| | | | | | | | | Removing an unused function which is causing one of the build bots to fail. This was introduced in the commit r223113. A proper cleanup of the so_imm tblgen defintion (made redundant by the mod_imm definition) needs to happen soon. llvm-svn: 223115
* Emit warning if define or undef reserved identifier or keyword.Serge Pavlov2014-12-028-2/+115
| | | | | | | | | | | | | | | | | | | | | Summary: This change implements warnings if macro name is identical to a keyword or reserved identifier. The warnings are different depending on the "danger" of the operation. Defining macro that replaces a keyword is on by default. Other cases produce warning that is off by default but can be turned on using option -Wreserved-id-macro. This change fixes PR11488. Reviewers: rnk Reviewed By: rnk Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D6194 llvm-svn: 223114
* Add support for ARM modified-immediate assembly syntax.Asiri Rathnayake2014-12-0211-42/+690
| | | | | | | | | | | | | | | | | | | | Certain ARM instructions accept 32-bit immediate operands encoded as a 8-bit integer value (0-255) and a 4-bit rotation (0-30, even). Current ARM assembly syntax support in LLVM allows the decoded (32-bit) immediate to be specified as a single immediate operand for such instructions: mov r0, #4278190080 The ARMARM defines an extended assembly syntax allowing the encoding to be made more explicit, as in: mov r0, #255, #8 ; (same 32-bit value as above) The behaviour of the two instructions can be different w.r.t flags, which is documented under "Modified immediate constants" in ARMARM. This patch enables support for this extended syntax at the MC layer. llvm-svn: 223113
* Add ARM relocations to ELFYAMLWill Newton2014-12-021-0/+3
| | | | | | Tested with check-all with no regressions. llvm-svn: 223112
* clang-format: precedence-based indentation when breaking before operators.Daniel Jasper2014-12-022-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ccccccccccccccccccccccccccccccccccccccccc; After: bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ccccccccccccccccccccccccccccccccccccccccc; Not particularly pretty, but can probably help to uncover bugs. And if this bugs somebody, parentheses can help. llvm-svn: 223111
* Emit Tag_ABI_FP_denormal correctly in fast-math mode.Charlie Turner2014-12-023-45/+255
| | | | | | | | | | | | | | | | | | | | The default ARM floating-point mode does not support IEEE 754 mode exactly. Of relevance to this patch is that input denormals are flushed to zero. The way in which they're flushed to zero depends on the architecture, * For VFPv2, it is implementation defined as to whether the sign of zero is preserved. * For VFPv3 and above, the sign of zero is always preserved when a denormal is flushed to zero. When FP support has been disabled, the strategy taken by this patch is to assume the software support will mirror the behaviour of the hardware support for the target *if it existed*. That is, for architectures which can only have VFPv2, it is assumed the software will flush to positive zero. For later architectures it is assumed the software will flush to zero preserving sign. Change-Id: Icc5928633ba222a4ba3ca8c0df44a440445865fd llvm-svn: 223110
* [signext.ll] Removal Of Duplicate Test CasesSonam Kumari2014-12-021-18/+9
| | | | | | Removed the duplicate test case existing in signext.ll file. llvm-svn: 223109
* Re-apply "Revert r166370 and r166540 now that Xcode 4.6 has been available ↵Bob Wilson2014-12-022-7/+0
| | | | | | | | | | | for a while." This reverts commit r176892. I had reverted this a while back to give Chromium more time to update, and Nico says it should be OK now. llvm-svn: 223108
* clang/test/Modules/malformed.cpp REQUIRES shell due to "cd".NAKAMURA Takumi2014-12-021-0/+2
| | | | llvm-svn: 223107
* CMake: make the regexes used for setting HOST_LINK_VERSION more forgiving ↵Hans Wennborg2014-12-021-1/+1
| | | | | | | | | | | | | (PR21268) If the output of 'ld -v' didn't match the regexes, CMake would previously error with a message like: CMake Error at tools/clang/CMakeLists.txt:269 (string): string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched an empty string. llvm-svn: 223106
* Try to fix the MSVC build.Hans Wennborg2014-12-022-11/+10
| | | | llvm-svn: 223105
* [mach-o] Fix TrieEdge leakNick Kledzik2014-12-021-5/+6
| | | | | | | | In PR21682 Jean-Daliel Dupas found a leak in the trie builder and suggested a fix was to use a list instead of SmallVector so that the list elements could be allocated in the BumpPtrAllocator. llvm-svn: 223104
* [mach-o] add support for arm64 compact unwind infoNick Kledzik2014-12-022-11/+348
| | | | | | | Tim previously added generic compact unwind processing and x86_64 support. This patch adds arm64 support. llvm-svn: 223103
* Rely on fewer features of the 'env' command. Darwin only supports '-i'.Chandler Carruth2014-12-021-2/+2
| | | | | | | I'm explicitly setting LC_ALL=C somewhat for documentation, but hopefully this also removes some host variation from the test results. llvm-svn: 223102
* Fix variable used only in assertion.Nick Lewycky2014-12-021-1/+2
| | | | llvm-svn: 223101
* Add a test that ensures the Clang driver behaves itself when the PATHChandler Carruth2014-12-021-0/+25
| | | | | | | | environment variable is changed to strange things out from under it. Prior to r223099 in LLVM, these test cases would crash in various ways (assert fails, stack exhaustion, etc.). llvm-svn: 223100
* Fix several bugs in r221220's new program finding code.Chandler Carruth2014-12-022-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | In both the Unix and Windows variants, std::getenv was called and the result passed directly to a function accepting a StringRef. This isn't OK because it might return a null pointer and that causes the StringRef constructor to assert (and generally produces crash-prone code if asserts are disabled). Fix this by independently testing the result as non-null prior to splitting things. This in turn uncovered another bug in the Unix variant where it would infinitely recurse if PATH="", or after this fix if PATH isn't set. There is no need to recurse at all. Slightly re-arrange the code to make it clear that we can just fixup the Paths argument based on the environment if we find anything. I don't know of a particularly useful way to test these routines in LLVM. I'll commit a test to Clang that ensures that its driver correctly handles various settings of PATH. However, I have no idea how to correctly write a Windows test for the PATHEXT change. Any Windows developers who could provide such a test, please have at. =D Many thanks to Nick Lewycky and others for helping debug this. =/ It was quite nasty for us to track down. llvm-svn: 223099
OpenPOWER on IntegriCloud