summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* R600/SI: Make more unordered comparisons legalMatt Arsenault2014-12-116-54/+33
| | | | | | | This saves a second compare and an and / or by using the unordered comparison instructions. llvm-svn: 224066
* R600/SI: Use unordered not equal instructionsMatt Arsenault2014-12-118-26/+25
| | | | llvm-svn: 224065
* Add 'REQUIERS: long_tests' to a few more long testsJonathan Roelofs2014-12-114-0/+8
| | | | llvm-svn: 224064
* [ASan] Change fake stack and local variables handling.Alexey Samsonov2014-12-112-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way we get fake stack from ASan runtime (to find use-after-return errors) and the way we represent local variables: - __asan_stack_malloc function now returns pointer to newly allocated fake stack frame, or NULL if frame cannot be allocated. It doesn't take pointer to real stack as an input argument, it is calculated inside the runtime. - __asan_stack_free function doesn't take pointer to real stack as an input argument. Now this function is never called if fake stack frame wasn't allocated. - __asan_init version is bumped to reflect changes in the ABI. - new flag "-asan-stack-dynamic-alloca" allows to store all the function local variables in a dynamic alloca, instead of the static one. It reduces the stack space usage in use-after-return mode (dynamic alloca will not be called if the local variables are stored in a fake stack), and improves the debug info quality for local variables (they will not be described relatively to %rbp/%rsp, which are assumed to be clobbered by function calls). This flag is turned off by default for now, but I plan to turn it on after more testing. llvm-svn: 224063
* [ASan] Change fake stack and local variables handling.Alexey Samsonov2014-12-113-48/+162
| | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way we get fake stack from ASan runtime (to find use-after-return errors) and the way we represent local variables: - __asan_stack_malloc function now returns pointer to newly allocated fake stack frame, or NULL if frame cannot be allocated. It doesn't take pointer to real stack as an input argument, it is calculated inside the runtime. - __asan_stack_free function doesn't take pointer to real stack as an input argument. Now this function is never called if fake stack frame wasn't allocated. - __asan_init version is bumped to reflect changes in the ABI. - new flag "-asan-stack-dynamic-alloca" allows to store all the function local variables in a dynamic alloca, instead of the static one. It reduces the stack space usage in use-after-return mode (dynamic alloca will not be called if the local variables are stored in a fake stack), and improves the debug info quality for local variables (they will not be described relatively to %rbp/%rsp, which are assumed to be clobbered by function calls). This flag is turned off by default for now, but I plan to turn it on after more testing. llvm-svn: 224062
* CodeGen: Stop using LeakDetector for MachineInstrDuncan P. N. Exon Smith2014-12-111-4/+0
| | | | | | | | | | | | Since `MachineInstr` is required to have a trivial destructor, it cannot remove itself from `LeakDetection`. Remove the calls. As it happens, this requirement is because `MachineFunction` allocates all `MachineInstr`s in a custom allocator; when the `MachineFunction` is destroyed they're dropped of the edge. There's no benefit to detecting leaks. llvm-svn: 224061
* IR: Store MDNodes in a separate LeakDetector containerDuncan P. N. Exon Smith2014-12-113-1/+32
| | | | | | | | | | | | | | | | This gives us better leak detection messages, like `Value` has. This also has the side effect of papering over a problem where `MachineInstr`s are added as garbage to the leak detector and then deleted without being removed. If `MDNode::getTemporary()` allocates an `MDNodeFwdDecl` in the same spot, the leak detector asserts. By separating `MDNode`s into their own container we lose that assertion. Since `MachineInstr` is required to have a trivial destructor, its usage of `LeakDetector` at all is pretty suspect. I'll be sending a patch soon to strip that out. llvm-svn: 224060
* [CodeGen] Add print and verify pass after each MachineFunctionPass by defaultMatthias Braun2014-12-1114-261/+207
| | | | | | | | | | | | | | | | | | | Previously print+verify passes were added in a very unsystematic way, which is annoying when debugging as you miss intermediate steps and allows bugs to stay unnotice when no verification is performed. To make this change practical I added the possibility to explicitely disable verification. I used this option on all places where no verification was performed previously (because alot of places actually don't pass the MachineVerifier). In the long term these problems should be fixed properly and verification enabled after each pass. I'll enable some more verification in subsequent commits. This is the 2nd attempt at this after realizing that PassManager::add() may actually delete the pass. llvm-svn: 224059
* LeakDetector: Simplify code and fix comments, NFCDuncan P. N. Exon Smith2014-12-111-18/+8
| | | | | | | | | | | | Rather than requiring overloads in the wrapper and the impl, just overload the impl and use templates in the wrapper. This makes it less error prone to add more overloads (`void *` defeats any chance the compiler has at noticing bugs, so the easier the better). At the same time, correct the comment that was lying about not changing functionality for `Value`. llvm-svn: 224058
* Fix platform_support.h's get_temp_file_name() on Newlib under __STRICT_ANSI__Jonathan Roelofs2014-12-111-0/+7
| | | | llvm-svn: 224057
* AsmParser: Don't crash on an ill-formed MDNodeVectorDavid Majnemer2014-12-112-2/+6
| | | | llvm-svn: 224056
* [modules] When constructing paths relative to a module, strip out /./ directoryRichard Smith2014-12-1112-62/+140
| | | | | | | components. These sometimes get synthetically added, and we don't want -Ifoo and -I./foo to be treated fundamentally differently here. llvm-svn: 224055
* [InstCombine][X86] Improved folding of calls to Intrinsic::x86_sse4a_insertqi.Andrea Di Biagio2014-12-112-1/+43
| | | | | | | | | | | | | | | | | | This patch teaches the instruction combiner how to fold a call to 'insertqi' if the 'length field' (3rd operand) is set to zero, and if the sum between field 'length' and 'bit index' (4th operand) is bigger than 64. From the AMD64 Architecture Programmer's Manual: 1. If the sum of the bit index + length field is greater than 64, then the results are undefined; 2. A value of zero in the field length is defined as a length of 64. This patch improves the existing combining logic for intrinsic 'insertqi' adding extra checks to address both point 1. and point 2. Differential Revision: http://reviews.llvm.org/D6583 llvm-svn: 224054
* AsmParser: Don't crash on an ill-formed MDNodeVectorDavid Majnemer2014-12-112-2/+6
| | | | llvm-svn: 224053
* Instead of having -Os/-Oz add OptimizeForSize/MinSize first, and laterPaul Robinson2014-12-114-6/+27
| | | | | | | | | | having OptimizeNone remove them again, just don't add them in the first place if the function already has OptimizeNone. Note that MinSize can still appear due to attributes on different declarations; a future patch will address that. llvm-svn: 224047
* Remove a convoluted way of calling close by moving the call to the only caller.Rafael Espindola2014-12-116-108/+30
| | | | | | As a bonus we can actually check the return value. llvm-svn: 224046
* This reverts commit r224043 and r224042.Rafael Espindola2014-12-1114-184/+241
| | | | | | check-llvm was failing. llvm-svn: 224045
* Silence static analyzer warnings in LLVMSupport.Michael Ilseman2014-12-112-0/+4
| | | | | | | The static analyzer catches a few potential bugs in LLVMSupport. Add in asserts to silence the warnings. llvm-svn: 224044
* Enable machineverifier in debug mode for X86, ARM, AArch64, MipsMatthias Braun2014-12-114-20/+20
| | | | llvm-svn: 224043
* [CodeGen] Add print and verify pass after each MachineFunctionPass by defaultMatthias Braun2014-12-1114-261/+204
| | | | | | | | | | | | | | | | Previously print+verify passes were added in a very unsystematic way, which is annoying when debugging as you miss intermediate steps and allows bugs to stay unnotice when no verification is performed. To make this change practical I added the possibility to explicitely disable verification. I used this option on all places where no verification was performed previously (because alot of places actually don't pass the MachineVerifier). In the long term these problems should be fixed properly and verification enabled after each pass. I'll enable some more verification in subsequent commits. llvm-svn: 224042
* [CodeGen] Let MachineVerifierPass own its banner stringMatthias Braun2014-12-112-6/+6
| | | | llvm-svn: 224041
* AST: Incomplete types might be zero sizedDavid Majnemer2014-12-112-3/+15
| | | | | | | | Comparing the address of an object with an incomplete type might return true with a 'distinct' object if the former has a size of zero. However, such an object should compare unequal with null. llvm-svn: 224040
* When checking for nonnull parameter attributes, also check the ParmVarDecl ↵Aaron Ballman2014-12-113-2/+15
| | | | | | since the attribute may reside there, instead of just on the FunctionDecl. Fixes PR21668. llvm-svn: 224039
* Removed the assertion that we can find any namedSean Callanan2014-12-111-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Objective-C type in the runtime. This is not actually true, it's entirely possible to say @class DoesntExist; @interface DoesExist { DoesntExist *whyyyyy; } @end and this code will not only compile but also run. So this assertion will fire in situations users might encounter. I left the assertion enabled in debug mode, because we could still catch a case we're not aware of (i.e., a class that we *ought* to have found but where somehow we mis-parsed the name). <rdar://problem/19151914> llvm-svn: 224038
* Add an XFAIL for Newlib's missing uchar.hJonathan Roelofs2014-12-111-0/+1
| | | | llvm-svn: 224037
* [Hexagon] Renaming classes in preparation for replacement.Colin LeMahieu2014-12-111-13/+13
| | | | llvm-svn: 224036
* ARM: convert isTargetIOS checks to isTargetDarwin.Tim Northover2014-12-114-12/+8
| | | | | | | | | | | The distinction is mostly useful in the front-end. By the time we get here, there are very few situations where we actually want different behaviour for Darwin and IOS (in fact Darwin mostly just exists in a few tests). So this should reduce any surprising weirdness for anyone using it. No functional change on anything anyone actually cares about. llvm-svn: 224035
* [Sanitizer] Don't modify mmap_limit_mb flag in runtime.Alexey Samsonov2014-12-111-6/+3
| | | | | | | Instead, rely on the fact that RAW_CHECK doesn't call mmap(), and we'll be able to print an error message and kill a program. llvm-svn: 224034
* [PowerPC] Implement BuildSDIVPow2, lower i64 pow2 sdiv using sradiHal Finkel2014-12-114-30/+116
| | | | | | | | | | | | | | | | PPCISelDAGToDAG contained existing code to lower i32 sdiv by a power-of-2 using srawi/addze, but did not implement the i64 case. DAGCombine now contains a callback specifically designed for this purpose (BuildSDIVPow2), and part of the logic has been moved to an implementation of that callback. Doing this lowering using BuildSDIVPow2 likely does not matter, compared to handling everything in PPCISelDAGToDAG, for the positive divisor case, but the negative divisor case, which generates an additional negation, can potentially benefit from additional folding from DAGCombine. Now, both the i32 and the i64 cases have been implemented. Fixes PR20732. llvm-svn: 224033
* Mark a bunch of long running tests as 'REQUIRES: long_tests'Jonathan Roelofs2014-12-1138-0/+86
| | | | | | This lets us skip them as UNSUPPORTED on slow systems like QEMU llvm-svn: 224032
* [Sanitizer] Fix report_path functionality:Alexey Samsonov2014-12-115-98/+103
| | | | | | | | | | | | | | | | | | | | | | | Summary: - Make sure mmap() is never called inside RawWrite function. - Wrap a bunch of standalone globals in a ReportFile object. - Make sure accesses to these globals are thread-safe. - Fix report_path functionality on Windows, where __sanitizer_set_report_path() would break program. I've started this yak shaving in order to make "CommonFlags::mmap_limit_mb" immutable. Currently we drop this flag to zero before printing an error message. Test Plan: regression test suite Reviewers: kcc, glider Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6595 llvm-svn: 224031
* [Tsan] Fix the signal_recursive.cc test to pass on systems with high loadsViktor Kutuzov2014-12-112-13/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D6504 llvm-svn: 224030
* Remove dead code. NFC.Rafael Espindola2014-12-114-109/+7
| | | | llvm-svn: 224029
* [AVX512] Add support for 512b variable bit shift intrinsics.Cameron McInally2014-12-115-39/+215
| | | | llvm-svn: 224028
* [Hexagon] Ading i64 <- i32, i32 sextw pattern.Colin LeMahieu2014-12-111-0/+2
| | | | llvm-svn: 224027
* [Hexagon] Adding encoding information for sign extend word instruction.Colin LeMahieu2014-12-115-27/+50
| | | | llvm-svn: 224026
* Only seek once before writing the member offsets.Rafael Espindola2014-12-111-18/+20
| | | | | | | This cuts down the number on system calls done by a static llvm-ar producing lib/libclangSema.a from 9164 to 442. llvm-svn: 224025
* Mark some more fenv tests as UNSUPPORTED by newlibJonathan Roelofs2014-12-112-0/+4
| | | | llvm-svn: 224024
* tsan: fix Go buildDmitry Vyukov2014-12-111-2/+1
| | | | | | GetRSS is used in Go build. llvm-svn: 224023
* tsan: don't subtract one from fake PCsDmitry Vyukov2014-12-113-6/+7
| | | | | | | These are fake and not actual PCs, more like function IDs. Pass them to external symbolizer untouched. llvm-svn: 224022
* Add an XFAIL for Newlib's missing fenv.hJonathan Roelofs2014-12-111-0/+2
| | | | llvm-svn: 224021
* llvm-ar: close input files early.Rafael Espindola2014-12-111-16/+13
| | | | | | We already have them mapped into memory, so we can just close the file. llvm-svn: 224020
* AVX-512: Added all forms of COMPRESS instructionElena Demikhovsky2014-12-117-22/+365
| | | | | | + intrinsics + tests llvm-svn: 224019
* Fix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)Timur Iskhodzhanov2014-12-111-5/+10
| | | | llvm-svn: 224018
* [mips][microMIPS] Implement CodeGen support for LI16 instruction.Jozef Kolek2014-12-114-5/+31
| | | | | | Differential Revision: http://reviews.llvm.org/D5840 llvm-svn: 224017
* InstSimplify: Remove usesless %a parameter from testsDavid Majnemer2014-12-111-4/+4
| | | | | | No functional change intended. llvm-svn: 224016
* The inliner needs to fix up debug information for llvm.dbg.declare, not only ↵Michael Kuperstein2014-12-112-0/+102
| | | | | | | | | | for llvm.dbg.value. Patch by Amjad Aboud Differential Revision: http://reviews.llvm.org/D6525 llvm-svn: 224015
* ELF/AArch64: Add a test for R_AARCH64_ABS32Will Newton2014-12-111-0/+59
| | | | llvm-svn: 224014
* ELF/AArch64: Add a test for R_AARCH64_ABS64Will Newton2014-12-111-0/+59
| | | | llvm-svn: 224013
* Emit warning if define or undef reserved identifier or keyword.Serge Pavlov2014-12-118-2/+115
| | | | | | Recommit of r223114, reverted in r223120. llvm-svn: 224012
OpenPOWER on IntegriCloud