summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Map directly from signature symbol to group index. NFC.Rafael Espindola2015-04-281-10/+13
| | | | llvm-svn: 236058
* Fix Sema tests using __try by adding tripleReid Kleckner2015-04-283-5/+5
| | | | llvm-svn: 236057
* Tests for r236055.Eric Christopher2015-04-284-0/+58
| | | | | | Patch by Teresa Johnson. llvm-svn: 236056
* This change is the first of 3 patches to add support for specifyingEric Christopher2015-04-282-18/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the profile output from the command line via -fprofile-instr-generate=<path>, where the specified output path/file will be overridden by the LLVM_PROFILE_FILE environment variable. Several changes are made to the runtime to support this: Add a new interface __llvm_profile_override_default_filename that will set the profile output filename, but allows LLVM_PROFILE_FILE to override. This is the interface used by the new option. Refactor the pid-expansion done for LLVM_PROFILE_FILE into a separate routine that can be shared by the various filename setting routines (so that the filename from the option can also use the "%p" syntax). Move the truncation into setFilename, and only truncate if there is a new filename specified (to maintain support for appending to the same profile file in the case of multiple shared objects built with profiling). Move the handling for a NULL filename passed to __llvm_profile_set_filename and __llvm_profile_override_default_filename into the new setFilenamePossiblyWithPid routine. This now correctly resets the output file to default.profraw instead of NULL. The handling for a null LLVM_PROFILE_FILE (which should not reset) is done by caller setFilenameFromEnvironment. Patch by Teresa Johnson. llvm-svn: 236055
* Reuse a lookup in an assert.Eric Christopher2015-04-281-3/+3
| | | | llvm-svn: 236054
* Remove redundant temporary std::vector.Rafael Espindola2015-04-281-25/+7
| | | | | | | New sections are added to the end of the list, so the RelSections array was redundant. llvm-svn: 236053
* [SEH] Add 32-bit lowering code for __tryReid Kleckner2015-04-288-153/+278
| | | | | | | | | | | | | | | | | | | | This is just the clang-side of 32-bit SEH. LLVM still needs work, and it will determinstically fail to compile until it's feature complete. On x86, all outlined handlers have no parameters, but they do implicitly take the EBP value passed in and use it to address locals of the parent frame. We model this with llvm.frameaddress(1). This works (mostly), but __finally block inlining can break it. For now, we apply the 'noinline' attribute. If we really want to inline __finally blocks on 32-bit x86, we should teach the inliner how to untangle frameescape and framerecover. Promote the error diagnostic from codegen to sema. It now rejects SEH on non-Windows platforms. LLVM doesn't implement SEH on non-x86 Windows platforms, but there's nothing preventing it. llvm-svn: 236052
* Fix the typo in r236044. NFC.Steven Wu2015-04-281-1/+1
| | | | llvm-svn: 236051
* ARM: fix peephole optimisation of TSTTim Northover2015-04-282-16/+28
| | | | | | | | | | | We were trying to look through COPY instructions, but only to the next instruction in a BB and incorrectly anyway. The cases where that would actually be a good idea are rare enough (and not even tested!) that it's not worth trying to get right. rdar://20721342 llvm-svn: 236050
* Avoid one more walk over all sections. NFC.Rafael Espindola2015-04-281-9/+3
| | | | | | Set the group section index as they are created. llvm-svn: 236049
* Style updatesAndrew Kaylor2015-04-281-18/+19
| | | | llvm-svn: 236048
* Use a range loop. NFC.Rafael Espindola2015-04-281-3/+2
| | | | llvm-svn: 236047
* [WinEH] Split blocks at calls to llvm.eh.begincatchAndrew Kaylor2015-04-286-36/+206
| | | | | | Differential Revision: http://reviews.llvm.org/D9311 llvm-svn: 236046
* Avoid an extra walk over the sections just to assign sections to groups.Rafael Espindola2015-04-281-30/+41
| | | | | | Assign the sections in the same pass we compute the index. llvm-svn: 236045
* Fix -fno-gnu-inline-asm doesn't catch file scope asmSteven Wu2015-04-282-0/+5
| | | | | | | | | | | | | | | | | | Summary: FileScopeAsm should be treated the same as funcion level inline asm. -fno-gnu-inline-asm should trigger an error if file scope asm is used. I missed this case from r226340. This should not affect ms-extension because it is not allowed in the file scope. Reviewers: bob.wilson, rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9328 llvm-svn: 236044
* Fix assertion failure if a lambda array-capture is followed by a this capture.Richard Smith2015-04-283-13/+13
| | | | llvm-svn: 236043
* Sparc: Add alternate aliases for conditional branch instructions.James Y Knight2015-04-282-0/+30
| | | | llvm-svn: 236042
* [SEH] Add an LLVM intrinsic for _exception_infoReid Kleckner2015-04-281-0/+1
| | | | | | Eventually, we will lower this out during IR preparation. llvm-svn: 236036
* Attempt to fix the MSVC build by making ExprIteratorSean Callanan2015-04-281-2/+7
| | | | | | inherit correctly. llvm-svn: 236035
* Work around a suspected MSVC miscompile to try to bring the MSVC2013 ↵Richard Smith2015-04-281-0/+1
| | | | | | buildbot back. llvm-svn: 236034
* Remove the GroupMapTy DenseMap. NFC.Rafael Espindola2015-04-283-21/+13
| | | | | | Instead use the Group symbol of MCSectionELF. llvm-svn: 236033
* Refactor to make MacroState ownership and lifetime clearer.Richard Smith2015-04-283-6/+15
| | | | llvm-svn: 236032
* transform fadd chains to increase parallelismSanjay Patel2015-04-282-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a compromise: with this simple patch, we should always handle a chain of exactly 3 operations optimally, but we're not generating the optimal balanced binary tree for a longer sequence. In general, this transform will reduce the dependency chain for a sequence of instructions using N operands from a worst case N-1 dependent operations to N/2 dependent operations. The optimal balanced binary tree would reduce the chain to log2(N). The trade-off for not dealing with longer sequences is: (1) we have less complexity in the compiler, (2) we avoid unknown compile-time blowup calculating a balanced tree, and (3) we don't need to worry about the increased register pressure required to parallelize longer sequences. It also seems unlikely that we would ever encounter really long strings of dependent ops like that in the wild, but I'm not sure how to verify that speculation. FWIW, I see no perf difference for test-suite running on btver2 (x86-64) with -ffast-math and this patch. We can extend this patch to cover other associative operations such as fmul, fmax, fmin, integer add, integer mul. This is a partial fix for: https://llvm.org/bugs/show_bug.cgi?id=17305 and if extended: https://llvm.org/bugs/show_bug.cgi?id=21768 https://llvm.org/bugs/show_bug.cgi?id=23116 The issue also came up in: http://reviews.llvm.org/D8941 Differential Revision: http://reviews.llvm.org/D9232 llvm-svn: 236031
* [bpf] fix buildAlexei Starovoitov2015-04-282-8/+9
| | | | | | Patch by Brenden Blanco. llvm-svn: 236030
* [cuda] Preserve TLS storage class of host variable even if it's aArtem Belevich2015-04-282-2/+20
| | | | | | device-side compilation. llvm-svn: 236029
* Use range loops. NFC.Rafael Espindola2015-04-281-7/+3
| | | | llvm-svn: 236028
* Relax an assert when there's a type mismatch in forward referencesFilipe Cabecinhas2015-04-283-1/+8
| | | | | | | | | | | | | | | | Summary: We don't seem to need to assert here, since this function's callers expect to get a nullptr on error. This way we don't assert on user input. Bug found with AFL fuzz. Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9308 llvm-svn: 236027
* Avoid adding to SectionIndexMap sections that we never lookup. NFC.Rafael Espindola2015-04-281-33/+28
| | | | llvm-svn: 236026
* Removed 'complete' from 2408; updated statusMarshall Clow2015-04-281-1/+1
| | | | llvm-svn: 236025
* [TestMiVar] Enable one of the tests for GCC.Siva Chandra2015-04-281-2/+2
| | | | | | | | | | | | | | | | | | Summary: The "internal" name of vars is different between clang and GCC. All this change does is to use a regex instead of the hardcoded internal name. Test Plan: dotest.py -C <clang|gcc> -p TestMiVar Reviewers: ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9128 llvm-svn: 236024
* Make getModRefInfo(Instruction *) not crash on certain types of instructionsDaniel Berlin2015-04-282-10/+23
| | | | llvm-svn: 236023
* Use a range loop. NFC.Rafael Espindola2015-04-281-3/+2
| | | | llvm-svn: 236015
* [asan] Use dl_iterate_phdr on Android.Evgeniy Stepanov2015-04-281-9/+19
| | | | | | It's available on Android/ARM starting with API 21 (L). llvm-svn: 236014
* [x86] remove RCPPS and RSQRTPS intrinsic instruction definitionsSanjay Patel2015-04-283-52/+6
| | | | | | | | | | | | | We don't need codegen-only intrinsic instructions for the vector forms of these instructions. This makes the reciprocal estimate instruction lowering identical to how we handle normal square roots: (V)SQRTPS / (V)SQRTPD. No existing regression tests fail with this patch. Differential Revision: http://reviews.llvm.org/D9301 llvm-svn: 236013
* Implemented ASTImporter support for Stmts and fixedSean Callanan2015-04-286-31/+726
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some bugs in the ASTImporter that this exposed: - When importing functions, the body (if any) was previously ignored. This patch ensures that the body is imported also. - When a function-local Decl is imported, the first thing the ASTImporter does is import its context (via ImportDeclParts()). This can trigger importing the Decl again as part of the body of the function (but only once, since the function's Decl has been added to ImportedDecls). This patch fixes that problem by extending ImportDeclParts() to return the imported Decl if it was imported as part of importing its context, and the patch adds ASTImporter::GetAlreadyImportedOrNull() to support this query. All callers of ImportDeclParts return the imported version of the Decl if ImportDeclParts() returns it. - When creating functions, InnerLocStart of the source function was re-used without importing. This is a straight up bug, and this patch makes ASTImporter import the InnerLocStart and use the imported version. - When importing FileIDs, the ASTImporter previously always tried to re-load the file for the corresponding CacheEntry from disk. This doesn't work if the CacheEntry corresponds to a named memory buffer. This patch changes the code so that if the UniqueID for the cache entry is invalid (i.e., it is not a disk file) the whole entry is treated as if it were invalid, which forces an in-memory copy of the buffer. Also added test cases, using the new support committed in 236011. llvm-svn: 236012
* Implemented support for testing the ASTImporter'sSean Callanan2015-04-282-1/+12
| | | | | | | | | ability to generate code that CodeGen likes. Test cases can use this functionality by calling // RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s llvm-svn: 236011
* Fix typo in comment.Nico Weber2015-04-281-1/+1
| | | | llvm-svn: 236010
* Add a fixme to resetTargetOptions to explain why it needs to goEric Christopher2015-04-281-0/+5
| | | | | | away. llvm-svn: 236009
* tsan: fix a bug memory access handlingDmitry Vyukov2015-04-282-1/+42
| | | | | | | | | | We incorrectly replaced shadow slots when the new value is not stronger than the old one. The bug can lead to false negatives. The bug was detected by Go race test suite: https://github.com/golang/go/issues/10589 llvm-svn: 236008
* Fix a [-Werror,-Winconsistent-missing-override] problem in theEric Christopher2015-04-281-1/+1
| | | | | | NVPTX overrides. llvm-svn: 236007
* Fix PR22047: ObjC: Method unavailability attribute doesn't work with ↵Jonathan Roelofs2015-04-282-6/+25
| | | | | | | | overloaded methods http://reviews.llvm.org/D9261 llvm-svn: 236006
* Combine instantiation context of field initializer with context of class.Serge Pavlov2015-04-282-1/+20
| | | | | | | | | | | | | | Inclass initializer is instantiated in its own LocalInstantiationScope. It causes problems when instantiating local classes - when instantiation scope is searched for DeclContext of the field, the search fails. As a solution, the instantiation scope of field initializer is combined with its outer scope. This patch fixes PR23194. Differential Revision: http://reviews.llvm.org/D9258 llvm-svn: 236005
* R600: Fix up for AsmPrinter's OutStreamer being a unique_ptrTom Stellard2015-04-282-2/+13
| | | | | | | | | | | Fixes a crash with basically any OpenGL application using the radeonsi driver. Patch by: Michel Dänzer Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90176 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 236004
* R600/SI: Add a lower case alias for subtarget feature: +DumpCodeTom Stellard2015-04-281-0/+5
| | | | | | | llc converts all feature strings to lower case, while the LLVM C API does not, so we need a lower case alias in order to test this with llc. llvm-svn: 236003
* Silencing a -Wuninitialized warning in a different way. This replaces ↵Aaron Ballman2015-04-281-22/+19
| | | | | | r235981, but is still NFC. llvm-svn: 236002
* Disable clang-tools-extra/test/pp-trace/pp-trace-modules.cpp on win32 for ↵NAKAMURA Takumi2015-04-281-0/+3
| | | | | | now. Investigating. llvm-svn: 236001
* [NVPTX] Handle addrspacecast constant expressions in aggregate initializersJustin Holewinski2015-04-285-2/+270
| | | | | | | | | | | We need to track if an AddrSpaceCast expression was seen when generating an MCExpr for a ConstantExpr. This change introduces a custom lowerConstant method to the NVPTX asm printer that will create NVPTXGenericMCSymbolRefExpr nodes at the appropriate places to encode the information that a given symbol needs to be casted to a generic address. llvm-svn: 236000
* Fix some preprocessor directives that were generating warnings in the test ↵Marshall Clow2015-04-282-2/+2
| | | | | | suite. llvm-svn: 235999
* [opaque pointer type] Encode the allocated type of an alloca rather than its ↵David Blaikie2015-04-282-8/+16
| | | | | | pointer result type. llvm-svn: 235998
* move IR-level optimization flags into their own structSanjay Patel2015-04-284-27/+70
| | | | | | | | | | | | | | | | | | | | | | This is a preliminary step to using the IR-level floating-point fast-math-flags in the SDAG (D8900). In this patch, we introduce the optimization flags as their own struct. As noted in the TODO comment, we should eventually share this data between the IR passes and the backend. We also switch the existing nsw / nuw / exact bit functionality of the BinaryWithFlagsSDNode class to use the new struct. The tradeoff is that instead of using the free but limited space of SDNode's SubclassData, we add a data member to the subclass. This means we don't have to repeat all of the get/set methods per flag, but we're potentially adding size to all nodes of this subclassi type. In practice on 64-bit systems (measured on Linux and MacOS X), there is no size difference between an SDNode and BinaryWithFlagsSDNode after this change: they're both 80 bytes. This means that we had at least one free byte to play with due to struct alignment. Differential Revision: http://reviews.llvm.org/D9325 llvm-svn: 235997
OpenPOWER on IntegriCloud