summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [DAGCombiner] Fixed incorrect test for buildvector of constant integers.Simon Pilgrim2015-03-281-14/+8
| | | | | | DAGCombiner::ReassociateOps was correctly testing for an constant integer scalar but failed to correctly test for constant integer vectors (it was testing for any constant vector). llvm-svn: 233482
* [ConstantFold] Don't fold ppc_fp128 <-> int bitcastsHal Finkel2015-03-282-2/+49
| | | | | | | | | | | | | PPC_FP128 is really the sum of two consecutive doubles, where the first double is always stored first in memory, regardless of the target endianness. The memory layout of i128, however, depends on the target endianness, and so we can't fold this without target endianness information. As a result, we must not do this folding in lib/IR/ConstantFold.cpp (it could be done instead in Analysis/ConstantFolding.cpp, but that's not done now). Fixes PR23026. llvm-svn: 233481
* Bail out if too many alias run-time-check comparisions would be neededTobias Grosser2015-03-282-0/+64
| | | | | | This fixes a crash observed in ffmpeg. llvm-svn: 233480
* Use an early return on failureTobias Grosser2015-03-281-5/+4
| | | | llvm-svn: 233479
* Bug 23051 - Fix build failure on Freebsd with gcc 4.9.Sylvestre Ledru2015-03-281-1/+1
| | | | | | Patch by Craig Rodrigues llvm-svn: 233478
* Code generate parameters and run-time checks after branching new code regionTobias Grosser2015-03-285-8/+50
| | | | | | | | | | | | | | | | | | | When creating parameters the SCEVexpander may introduce new induction variables, that possibly create scalar dependences in the original scop, before we code generate the scop. The resulting scalar dependences may then inhibit correct code generation of the scop. To prevent this, we first version the code without a run-time check and only then introduce new parameters and the run-time condition. The if-condition that guards the original scop from being modified by the SCEVexpander. This change causes some test case changes as the run-time conditions are now introduced in the split basic block rather than in the entry basic block. This fixes http://llvm.org/PR22069 Test case reduced by: Karthik Senthil llvm-svn: 233477
* Drop redundant run line in checkTobias Grosser2015-03-281-1/+0
| | | | llvm-svn: 233476
* Convert feature strings to lowercase even if they have a '+'/'-' in front of ↵Craig Topper2015-03-281-1/+1
| | | | | | them. llvm-svn: 233475
* Partially revert the changes I made in r233473 to keep the code concise.Akira Hatanaka2015-03-281-137/+47
| | | | llvm-svn: 233474
* clang-format X86ATTInstPrinter.{h,cpp} before I make changes to these files.Akira Hatanaka2015-03-282-76/+156
| | | | llvm-svn: 233473
* ELF: Use C++11 non-member initialization.Rui Ueyama2015-03-282-56/+43
| | | | | | | | Setting _alignment member varaible to 0 look suspicious since the minimum alignment value is 1. I'm not going to change that number in this patch, though. llvm-svn: 233472
* [SparcInstPrinter] Use the subtarget that is passed to the print functionAkira Hatanaka2015-03-283-34/+47
| | | | | | | | | | | instead of the one passed to the constructor. Unfortunately, I don't have a test case for this change. In order to test my change, I will have to run the code after line 90 in printSparcAliasInstr. I couldn't make that happen because printAliasInstr would always handle the printing of fcmp instructions that the code after line 90 is supposed to handle. llvm-svn: 233471
* Update comment to match code behavior.Craig Topper2015-03-281-1/+1
| | | | llvm-svn: 233470
* Verifier: Allow subroutine types to have no type arrayDuncan P. N. Exon Smith2015-03-282-6/+28
| | | | | | | | | Loosen one check from r233446: as long as `DIBuilder` requires a non-null type for every subprogram, we should allow a null type array. Also add tests for the rest of `MDSubroutineType`, which were somehow missing. llvm-svn: 233468
* Fix comparison functions.Richard Trieu2015-03-281-5/+5
| | | | llvm-svn: 233467
* DebugInfo: Fix testcases with invalid MDSubprogram nodesDuncan P. N. Exon Smith2015-03-2833-153/+70
| | | | | | | | | | | | | | | | | Fix testcases that don't pass the verifier after a WIP patch to check `MDSubprogram` operands more effectively. I found the following issues: - When `isDefinition: false`, the `variables:` field might point at `!{i32 786468}`, or at a tuple that pointed at an empty tuple with the comment "previously: invalid DW_TAG_base_type" (I vaguely recall adding those comments during an upgrade script). In these cases, I just dropped the array. - The `variables:` field might point at something like `!{!{!8}}`, where `!8` was an `MDLocation`. I removed the extra layer of indirection. - Invalid `type:` (not an `MDSubroutineType`). llvm-svn: 233466
* [scan-build] Be friendly to "" in the argument list.Anna Zaks2015-03-281-0/+5
| | | | | | Do not fail when "" is one of the compilation arguments. llvm-svn: 233465
* [CodeGen] "PromoteInteger" f32 to f64 doesn't make sense.Ahmed Bougacha2015-03-281-13/+6
| | | | | | | | | | | | | | | | | | | | | | The original f32->f64 promotion logic was refactored into roughly the currently shape in r37781. However, starting with r132263, the legalizer has been split into different kinds, and the previous "Promote" (which did the right thing) was search-and-replace'd into "PromoteInteger". The divide gradually deepened, with type legalization ("PromoteInteger") being separated from ops legalization ("Promote", which still works for floating point ops). Fast-forward to today: there's no in-tree target with legal f64 but illegal f32 (rather: no tests were harmed in the making of this patch). With such a target, i.e., if you trick the legalizer into going through the PromoteInteger path for FP, you get the expected brokenness. For instance, there's no PromoteIntRes_FADD (the name itself sounds wrong), so we'll just hit some assert in the PromoteInteger path. Don't pretend we can promote f32 to f64. Instead, always soften. llvm-svn: 233464
* [ARM] Fix group relocations test.Leny Kholodov2015-03-281-9/+11
| | | | | | | | | The fix is for r233277. This makes tests work. On some build bots the test failed due to different llvm-objdump behaviour for target detection. Now test checks .text section with etalon and illustrates correctness of generated code without using of -disassemble llvm-objdump option. llvm-svn: 233463
* [Modules] Don't compute a modules cache path if we're not using modules!Chandler Carruth2015-03-281-1/+2
| | | | | | | | | Notably, this prevents us from doing *tons* of work to compute the modules hash, including trying to read a darwin specific plist file off of the system. There is a lot that needs cleaning up below this layer too. llvm-svn: 233462
* ELF: Add a comment about the sysroot path.Rui Ueyama2015-03-281-3/+5
| | | | llvm-svn: 233461
* ELF: Do less if HAVE_CXXABI_H is not defined.Rui Ueyama2015-03-281-9/+9
| | | | | | | | | | | If HAVE_CXXABI_H is not defined, this function is the identity function. Because HAVE_CXXABI_H did not protect the entire function, it did extra stuffs before returning the argument. The new code calls fewer functions. This should help developers understand this piece of code. llvm-svn: 233460
* Make the clang-fuzzer use the CompilerInstance directly.Manuel Klimek2015-03-283-6/+23
| | | | | | Going through the driver is too slow. llvm-svn: 233459
* ELF: make code concise using "using".Rui Ueyama2015-03-281-8/+12
| | | | llvm-svn: 233458
* A conversion from a scoped enumeration bitfield to an integral type is anRichard Smith2015-03-282-2/+12
| | | | | | | | integral promotion only if it converts to the underlying type or its promoted type, not if it converts to the promoted type that the bitfield would have it if were of the underlying type. llvm-svn: 233457
* Use cast instead of dyn_cast in combination with llvm_unreachable.Rui Ueyama2015-03-281-8/+7
| | | | llvm-svn: 233456
* Add initial version of a clang-fuzzer.Manuel Klimek2015-03-283-0/+51
| | | | llvm-svn: 233455
* Use lambda for std::find_if.Rui Ueyama2015-03-281-15/+8
| | | | llvm-svn: 233454
* Remove else after return.Rui Ueyama2015-03-271-4/+3
| | | | llvm-svn: 233453
* Use lambda instead of defining a class with operator().Rui Ueyama2015-03-271-9/+3
| | | | llvm-svn: 233452
* [ARM] Enable changing instprinter's behavior based on the per-functionAkira Hatanaka2015-03-274-141/+288
| | | | | | subtarget. llvm-svn: 233451
* ELF: make scopes of error code varaibles narrower.Rui Ueyama2015-03-271-11/+5
| | | | llvm-svn: 233450
* ELF: Simplify SymbolFile.Rui Ueyama2015-03-271-12/+2
| | | | llvm-svn: 233449
* clang-format ARMInstPrinter.{h,cpp} before I make changes to these files.Akira Hatanaka2015-03-272-267/+282
| | | | llvm-svn: 233448
* [SCEV] Look at backedge dominating conditions.Sanjoy Das2015-03-272-0/+95
| | | | | | | | | | | | | | | | Summary: This change teaches ScalarEvolution::isLoopBackedgeGuardedByCond to look at edges within the loop body that dominate the latch. We don't do an exhaustive search for all possible edges, but only a quick walk up the dom tree. Reviewers: atrick, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8627 llvm-svn: 233447
* Verifier: Check operands of MDType subclasses and MDCompileUnitDuncan P. N. Exon Smith2015-03-277-154/+278
| | | | | | | | | | | | | | | | | Add verify checks for `MDType` subclasses and for `MDCompileUnit`. These new checks don't yet incorporate everything from `Verify()`, but at least they sanity check the operands. Also downcast accessors as possible. A lot of these accessors can't be downcast as far as we'd like because of arrays of typed objects (stored in a generic `MDTuple`) and `MDString`-based type references. Eventually I'll port over `DIRef<>` and `DITypedArray<>` from `DebugInfo.h` to clean those up as well. Updated bitrotted testcases separately in r233415 and r233443 to reduce churn on the off-chance this needs to be reverted. llvm-svn: 233446
* DebugInfo: Require non-null in DIBuilder::retainType()Duncan P. N. Exon Smith2015-03-271-1/+4
| | | | | | | Assert that a non-null value is being passed in. Note that I fixed the one offender in clang in r233443. llvm-svn: 233445
* Remove unused forward declaration.Rui Ueyama2015-03-271-1/+0
| | | | llvm-svn: 233444
* DebugInfo: Don't call DIBuilder::retainType(nullptr)Duncan P. N. Exon Smith2015-03-271-3/+4
| | | | | | | | | | An upcoming LLVM commit will make calling `DIBuilder::retainType(nullptr)` illegal (actually, it already was, but it wasn't verified). Check for null before calling. This triggered in test/CodeGenObjC/debug-info-block-helper.m. llvm-svn: 233443
* ELF: Use llvm::Optional<StringRef> instead of a bool and a StringRef.Rui Ueyama2015-03-271-7/+4
| | | | llvm-svn: 233442
* Remove virtual from some ELFLinkingContext member functions.Rui Ueyama2015-03-271-8/+6
| | | | | | | | I expected that these functions are overridden somewhere in the LLD code base, but they are actually not. Removing virtual for readability (and performance). llvm-svn: 233441
* Reorder ELFLinkingContext member functions and run clang-format.Rui Ueyama2015-03-271-26/+7
| | | | | | | So that they look to be following the same style as other functions around them. llvm-svn: 233440
* Fixing a bug with optimized catch-all handlers in WinEHPrepareAndrew Kaylor2015-03-271-5/+14
| | | | llvm-svn: 233439
* ELF: Do not use llvm::Optional for _maxPageSize.Rui Ueyama2015-03-271-11/+3
| | | | | | | | Use of llvm::Optional seems useless here because we can set the default value 0x1000 as an initial value to the varaible. This patch also de-virtualize the accessor functions. llvm-svn: 233438
* Fix comment style to follow more common style.Rui Ueyama2015-03-271-6/+10
| | | | llvm-svn: 233437
* ELF: Make addSearchPath return void instead of bool.Rui Ueyama2015-03-271-4/+1
| | | | | | | | No one uses return value of the member function, and return value is always true. Returning a value doesn't make sense. This patch also de-virtualize the fucntion. llvm-svn: 233436
* ELF: Remove redundant =delete.Rui Ueyama2015-03-271-3/+0
| | | | | | | Since we have a (protected) constructor having two parameters, the default constructor is not defined even if we don't do =delete. llvm-svn: 233435
* ELF: Use C++11 non-member initialization.Rui Ueyama2015-03-272-30/+20
| | | | llvm-svn: 233434
* Remove unused varaible.Rui Ueyama2015-03-271-1/+0
| | | | llvm-svn: 233433
* Verifier: Call verifyModule() from llc and optDuncan P. N. Exon Smith2015-03-2718-83/+123
| | | | | | | | | | | | | | | | | | | | | | Change `llc` and `opt` to run `verifyModule()`. This ensures that we check the full module before `FunctionPass::doInitialization()` ever gets called (I was getting crashes in `DwarfDebug` instead of verifier failures when testing a WIP patch that checks operands of compile units). In `opt`, also move up debug-info-stripping so that it still runs before verification. There was a fair bit of broken code that was sitting in tree. Interestingly, some were cases of a `select` that referred to itself in `-instcombine` tests (apparently an intermediate result). I split them off to `*-noverify.ll` tests with RUN lines like this: opt < %s -S -disable-verify -instcombine | opt -S | FileCheck %s This avoids verifying the input file (so we can get the broken code into `-instcombine), but still verifies the output with a second call to `opt` (to verify that `-instcombine` will clean it up like it should). llvm-svn: 233432
OpenPOWER on IntegriCloud