summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* X86: Don't transform shifts into ands when the sign bit is tested.Benjamin Kramer2014-04-242-1/+13
| | | | | | Should unbreak MultiSource/Benchmarks/mediabench/g721/g721encode/encode. llvm-svn: 207145
* Remove dead inline function that doesn't compileReid Kleckner2014-04-241-3/+0
| | | | | | MSVC doesn't diagnose this, interestingly. llvm-svn: 207144
* Add 'musttail' marker to call instructionsReid Kleckner2014-04-2421-30/+334
| | | | | | | | | | | | This is similar to the 'tail' marker, except that it guarantees that tail call optimization will occur. It also comes with convervative IR verification rules that ensure that tail call optimization is possible. Reviewers: nicholas Differential Revision: http://llvm-reviews.chandlerc.com/D3240 llvm-svn: 207143
* Fix rdtsc.ll test to match r8 on win64Reid Kleckner2014-04-241-1/+1
| | | | llvm-svn: 207142
* [PECOFF] Define implicit symbols for exported ones.Rui Ueyama2014-04-241-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is to fix a compatibility issue with MSVC link.exe as to use of dllexported symbols inside DLL. A DLL exports two symbols for a function. One is non-decorated one, and the other is with __imp_ prefix. The former is a function that you can directly call, and the latter is a pointer to the function. These dllexported symbols are created by linker for programs that link against the DLL. So, I naturally believed that __imp_ symbols become available when you once create a DLL and link against it, but they don't exist until then. And that's not true. MSVC link.exe is smart enough to allow users to use __imp_ symbols locally. That is, if a symbol is specified with /export option, it implicitly creates a new symbol with __imp_ prefix as a pointer to the exported symbol. This feature allows the following program to be linked and run, although _imp__hello is not defined in this code. #include <stdio.h> __declspec(dllexport) void hello(void) { printf("Hello\n"); } extern void (*_imp__hello)(void); int main() { _imp__hello(); return 0; } MSVC link.exe prints out the following warning when linking it. LNK4217: locally defined symbol _hello imported in function _main Using __imp_ symbols locally is I think not a good coding style. One should just take an address using "&" operator rather than appending __imp_ prefix. However, there are programs in the wild that depends on this link.exe's behavior, so we need this feature. llvm-svn: 207141
* [sanitizer] wordexp isn't available on iOSJustin Bogner2014-04-241-1/+1
| | | | llvm-svn: 207140
* Fixed an issue where we would try to interrupt a process while it is in the ↵Greg Clayton2014-04-245-7/+110
| | | | | | | | | | process of naturally stopping due to another reason (breakpoint, or step). Added a new MachProcess::Interrupt() which correctly tracks such cases and "does the right thing". <rdar://problem/16593556> llvm-svn: 207139
* MicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522.Nico Weber2014-04-241-0/+2
| | | | llvm-svn: 207138
* Fix a tiny test-only leak, found by LSan.Nico Weber2014-04-241-8/+8
| | | | llvm-svn: 207137
* Remove C++11ism (specializing a template in a surrounding namespace) to ↵Richard Smith2014-04-241-3/+5
| | | | | | appease the buildbots. llvm-svn: 207136
* Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the locationAdrian Prantl2014-04-242-17/+86
| | | | | | | | | of the dbg.value. This gets rid of tons of redundant variable DIEs in subscopes. rdar://problem/14874886, rdar://problem/16679936 llvm-svn: 207135
* Intrin.h: remove __rdtsc and __rdtscp declarationsHans Wennborg2014-04-241-3/+0
| | | | | | Since r207132, these are defined in ia32intrin.h. llvm-svn: 207134
* [modules] "Specialize" a function by actually specializing a function templateRichard Smith2014-04-242-13/+9
| | | | | | | rather than by adding an overload and hoping that it's declared before the code that calls it. (In a modules build, it isn't.) llvm-svn: 207133
* [X86] Add Clang support for intrinsics __rdtsc and __rdtscp.Andrea Di Biagio2014-04-243-3/+12
| | | | | | | | | | | | | | This patch: 1. Adds a definition for two new GCCBuiltins in BuiltinsX86.def: __builtin_ia32_rdtsc; __builtin_ia32_rdtscp; 2. Replaces the already existing definition of intrinsic __rdtsc in ia32intrin.h with a simple call to the new GCC builtin __builtin_ia32_rdtsc. 3. Adds a definition for the new intrinsic __rdtscp in ia32intrin.h llvm-svn: 207132
* Add user-defined callback on write() calls.Peter Collingbourne2014-04-245-1/+238
| | | | | | | | | | | Add dfsan_set_write_callback(), which sets a callback to be invoked when a write() call is invoked within DFSan instrumented code. Patch by Sam Kerner! Differential Revision: http://reviews.llvm.org/D3268 llvm-svn: 207131
* Debug info for optimized code: Support variables that are on the stack andAdrian Prantl2014-04-2410-132/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine-intrinsics testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207130
* Making a SharingPtr out of a nullptr_t should be a safe and allowed operationEnrico Granata2014-04-241-0/+9
| | | | llvm-svn: 207129
* Squelch leak found by LSan by handling missing switch case.Jordan Rose2014-04-241-2/+3
| | | | | | | | Also, use the enum type in the switch so this doesn't happen again. PR19523 llvm-svn: 207128
* [X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.Andrea Di Biagio2014-04-246-39/+160
| | | | | | | | | | | | | | This patch: - Adds two new X86 builtin intrinsics ('int_x86_rdtsc' and 'int_x86_rdtscp') as GCCBuiltin intrinsics; - Teaches the backend how to lower the two new builtins; - Introduces a common function to lower READCYCLECOUNTER dag nodes and the two new rdtsc/rdtscp intrinsics; - Improves (and extends) the existing x86 test 'rdtsc.ll'; now test 'rdtsc.ll' correctly verifies that both READCYCLECOUNTER and the two new intrinsics work fine for both 64bit and 32bit Subtargets. llvm-svn: 207127
* R600/SI: Use address space in allowsUnalignedMemoryAccessesMatt Arsenault2014-04-241-0/+30
| | | | llvm-svn: 207126
* [PECOFF] Allow symbols not starting with '_' in x86Rui Ueyama2014-04-241-1/+2
| | | | | | | | Not all symbols are decorated with an underscore in x86. You can write undecorated symbols in assembly, for example. Thus this assertion is too strong. llvm-svn: 207125
* Spread some const around for non-mutating uses of MCSymbolData.David Blaikie2014-04-249-26/+33
| | | | | | | | I discovered this const-hole while attempting to coalesnce the Symbol and SymbolMap data structures. There's some pending issues with that, but I figured this change was easy to flush early. llvm-svn: 207124
* [mips] Remove non-ascii character.Matheus Almeida2014-04-241-1/+1
| | | | llvm-svn: 207123
* If CMake finds a python interpreter, use itEd Maste2014-04-242-5/+6
| | | | | | | | | | | | | The FreeBSD package building cluster installs e.g. 'python2.7', but no plain 'python' to avoid version-related issues. CMake's FindPythonInterp locates an interpreter with such a name and provides it in the PYTHON_EXECUTABLE variable. Use that if it's set, falling back to the original '/usr/bin/env python' otherwise. Patch by Brooks Davis in FreeBSD ports commit r352012 llvm-svn: 207122
* [mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()Daniel Sanders2014-04-244-1/+108
| | | | | | | | | | | | | | Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3472 llvm-svn: 207121
* AArch64/ARM64: add ARM64 runs to more MC tests.Tim Northover2014-04-243-0/+3
| | | | llvm-svn: 207120
* AArch64/ARM64: run AArch64 NEON MC tests through ARM64 too.Tim Northover2014-04-2454-97/+152
| | | | | | | | This skips a couple of compare ones due to the different syntaxt for floating-point 0.0. AArch64 does it more canonically, and we'll need to fiddle ARM64 to make it work. llvm-svn: 207119
* Fix memory leak of MCSymbolData in MCAsmStreamer.David Blaikie2014-04-241-8/+10
| | | | | | | | | Leak identified by LSan and reported by Kostya Serebryany. Let's get a bit experimental here... in theory our minimum compiler versions support unordered_map. llvm-svn: 207118
* AArch64: update tests to new way of printing NEON lists.Tim Northover2014-04-244-66/+66
| | | | llvm-svn: 207117
* AArch64: print NEON lists with a space.Tim Northover2014-04-2415-1522/+1522
| | | | | | | This matches ARM64 behaviour, which I think is clearer. It also puts all the churn from that difference into one easily ignored commit. llvm-svn: 207116
* [asan] Use MCInstrInfo in inline asm instrumentation.Evgeniy Stepanov2014-04-243-26/+17
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 207115
* tsan: stop background thread when sandbox is enabledDmitry Vyukov2014-04-247-8/+46
| | | | | | Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=56 llvm-svn: 207114
* Add DLL thunks for recently-added memcpy, memset and memmove ASan intrinsicsTimur Iskhodzhanov2014-04-241-0/+4
| | | | llvm-svn: 207113
* AArch64/ARM64: enable remaining MC elf tests.Tim Northover2014-04-243-0/+7
| | | | llvm-svn: 207112
* AArch64/ARM64: allow negative addends, at least on ELF.Tim Northover2014-04-242-14/+20
| | | | llvm-svn: 207111
* ARM64: support relocated "TBZ/TBNZ" instructions.Tim Northover2014-04-242-0/+5
| | | | llvm-svn: 207110
* AArch64/ARM64: support relocated ADR instructionTim Northover2014-04-242-1/+5
| | | | llvm-svn: 207109
* AArch64/ARM64: add support for :abs_gN_s: MOVZ modifiersTim Northover2014-04-247-0/+36
| | | | | | We only need assembly support, so it's fairly easy. llvm-svn: 207108
* CommentToXMLConverter: Don't use "default" to method(s). It is unavailable ↵NAKAMURA Takumi2014-04-241-1/+1
| | | | | | in msc17. llvm-svn: 207107
* ARM64: shut up warning about variable only used in assert.Tim Northover2014-04-241-0/+1
| | | | llvm-svn: 207106
* AArch64/ARM64: disentangle the "B.CC" and "LDR lit" operandsTim Northover2014-04-2414-54/+97
| | | | | | | | | | | | | These can have different relocations in ELF. In particular both: b.eq global ldr x0, global are valid, giving different relocations. The only possible way to distinguish them is via a different fixup, so the operands had to be separated throughout the backend. llvm-svn: 207105
* AArch64/ARM64: enable some MC tests on ARM64Tim Northover2014-04-246-2/+8
| | | | | | | This will also (as with CodeGen) disable testing when the ARM64 backend is not present. llvm-svn: 207104
* AArch64/ARM64: port bitfield test to ARM64.Tim Northover2014-04-241-12/+20
| | | | llvm-svn: 207103
* AArch64/ARM64: implement BFI optimisationTim Northover2014-04-243-62/+161
| | | | | | | | | | | ARM64 was not producing pure BFI instructions for bitfield insertion operations, unlike AArch64. The approach had to be a little different (in ISelDAGToDAG rather than ISelLowering), and the outcomes aren't identical but hopefully this gives it similar power. This should address PR19424. llvm-svn: 207102
* AArch64/ARM64: port more testsTim Northover2014-04-244-0/+77
| | | | llvm-svn: 207101
* Windows Fix: added inttypes.h. Introduces macro redefinition warnings due to ↵Colin Riley2014-04-241-0/+1
| | | | | | LLVM itself externally defining the PRI macros, but now builds on vs2013. llvm-svn: 207100
* [asan] enable use_sigaltstack by default (this will provide verbose reports ↵Kostya Serebryany2014-04-242-1/+2
| | | | | | on stack-overflow instead of silently crashing with SEGV) llvm-svn: 207099
* [LCG] Incorporate the core trick of improvements on the naive Tarjan'sChandler Carruth2014-04-242-45/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | algorithm here: http://dl.acm.org/citation.cfm?id=177301. The idea of isolating the roots has even more relevance when using the stack not just to implement the DFS but also to implement the recursive step. Because we use it for the recursive step, to isolate the roots we need to maintain two stacks: one for our recursive DFS walk, and another of the nodes that have been walked. The nice thing is that the latter will be half the size. It also fixes a complete hack where we scanned backwards over the stack to find the next potential-root to continue processing. Now that is always the top of the DFS stack. While this is a really nice improvement already (IMO) it further opens the door for two important simplifications: 1) De-duplicating some of the code across the two different walks. I've actually made the duplication a bit worse in some senses with this patch because the two are starting to converge. 2) Dramatically simplifying the loop structures of both walks. I wanted to do those separately as they'll be essentially *just* CFG restructuring. This patch on the other hand actually uses different datastructures to implement the algorithm itself. llvm-svn: 207098
* QueryEngineTest.cpp: Appease g++47.NAKAMURA Takumi2014-04-241-1/+1
| | | | llvm-svn: 207097
* ClangQueryTests: Fix msc17 build. Non-static member initializers are ↵NAKAMURA Takumi2014-04-242-11/+20
| | | | | | unavailable. llvm-svn: 207096
OpenPOWER on IntegriCloud