summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Re-enable comment re-indentation for Java/JS.Daniel Jasper2015-01-042-6/+19
| | | | | | This was broken by r224120. llvm-svn: 225130
* Fix indentation. No behavior change.Nico Weber2015-01-041-1/+1
| | | | llvm-svn: 225129
* Wrap to 80 columns, no behavior change.Nico Weber2015-01-041-4/+7
| | | | llvm-svn: 225128
* InstCombine: match can find ConstantExprs, don't assume we have a ValueDavid Majnemer2015-01-042-2/+11
| | | | | | | | | | We assumed the output of a match was a Value, this would cause us to assert because we would fail a cast<>. Instead, use a helper in the Operator family to hide the distinction between Value and Constant. This fixes PR22087. llvm-svn: 225127
* ValueTracking: ComputeNumSignBits should tolerate misshapen phi nodesDavid Majnemer2015-01-042-2/+33
| | | | | | | | | | | | PHI nodes can have zero operands in the middle of a transform. It is expected that utilities in Analysis don't freak out when this happens. Note that it is considered invalid to allow these misshapen phi nodes to make it to another pass. This fixes PR22086. llvm-svn: 225126
* Document that GetTypeForDeclarator() cannot return a null type.Nico Weber2015-01-043-18/+13
| | | | | | | | | | | | | Also add a few asserts for this. The existing code assumes this in a bunch of places already (see e.g. the assert at the top of ParseTypedefDecl(), and there are many unchecked calls on the result of GetTypeForDeclarator()), and from looking through the code this should always be true from what I can tell. This allows removing ASTContext::getNullTypeSourceInfo() too as that's now unused. No behavior change intended. llvm-svn: 225125
* Crash less enthusiasticially on _Atomic or __restrict__ on invalid types.Nico Weber2015-01-042-4/+14
| | | | | | | | | | Many places in Sema cannot handle isNull() types. This is fine, because in most places the type building code recovers by falling back to IntTy. In GetFullTypeForDeclarator(), this is done at the end of the getNumTypeObjects() loop body. This function calls BuildQualifiedType() before this fallback is done though, so it explicitly needs to check for isNull() types. llvm-svn: 225124
* [APFloat][ADT] Fix sign handling logic for FMA results that truncate to zero.Lang Hames2015-01-042-1/+42
| | | | | | | | | | | | | | This patch adds a check for underflow when truncating results back to lower precision at the end of an FMA. The additional sign handling logic in APFloat::fusedMultiplyAdd should only be performed when the result of the addition step of the FMA (in full precision) is exactly zero, not when the result underflows to zero. Unit tests for this case and related signed zero FMA results are included. Fixes <rdar://problem/18925551>. llvm-svn: 225123
* Wrap to 80 columns, no behavior change.Nico Weber2015-01-041-4/+5
| | | | llvm-svn: 225122
* AST: Remove overzealous assertion from IsModifiableDavid Majnemer2015-01-042-6/+4
| | | | | | It's reasonable to ask if an l-value with class type is modifiable. llvm-svn: 225121
* llvm-readobj: add support to dump COFF export tablesSaleem Abdulrasool2015-01-037-0/+39
| | | | | | | This enhances llvm-readobj to print out the COFF export table, similar to the -coff-import option. This is useful for testing in lld. llvm-svn: 225120
* ARM: permit tail calls to weak externals on COFFSaleem Abdulrasool2015-01-033-2/+25
| | | | | | | | | | | Weak externals are resolved statically, so we can actually generate the tail call on PE/COFF targets without breaking the requirements. It is questionable whether we want to propagate the current behaviour for MachO as the requirements are part of the ARM ELF specifications, and it seems that prior to the SVN r215890, we would have tail'ed the call. For now, be conservative and only permit it on PE/COFF where the call will always be fully resolved. llvm-svn: 225119
* Parse: __attribute__((keyword)) shouldn't errorDavid Majnemer2015-01-033-5/+6
| | | | | | | Weird constructs like __attribute__((inline)) or __attibute__((typename)) should result in warnings, not errors. llvm-svn: 225118
* [PowerPC/BlockPlacement] Allow target to provide a per-loop alignment preferenceHal Finkel2015-01-035-13/+92
| | | | | | | | | | | | | | | | | The existing code provided for specifying a global loop alignment preference. However, the preferred loop alignment might depend on the loop itself. For recent POWER cores, loops between 5 and 8 instructions should have 32-byte alignment (while the others are better with 16-byte alignment) so that the entire loop will fit in one i-cache line. To support this, getPrefLoopAlignment has been made virtual, and can be provided with an optional MachineLoop* so the target can inspect the loop before answering the query. The default behavior, as before, is to return the value set with setPrefLoopAlignment. MachineBlockPlacement now queries the target for each loop instead of only once per function. There should be no functional change for other targets. llvm-svn: 225117
* Volatile reads are side-effecting operations, but in the general case of ↵Aaron Ballman2015-01-032-3/+11
| | | | | | | | | | | access through a volatile-qualified type, we're not certain of the underlying object's side-effects on access. Treat volatile accesses as "maybe" instead of "definite" side effects for the purposes of warning on evaluations in an unevaluated context. No longer diagnose on idiomatic code like: int * volatile v; (void)sizeof(*v); llvm-svn: 225116
* [PowerPC] Use 16-byte alignment for modern cores for functions/loopsHal Finkel2015-01-033-4/+110
| | | | | | | | | | | | Most modern PowerPC cores prefer that functions and loops start on 16-byte-aligned boundaries (*), so instruct block placement, etc. to make this happen. The branch selector has also been adjusted so account for the extra nops that might now be inserted before loop headers. (*) Some cores actually prefer other alignments for small loops, but that will be addressed in a follow-up commit. llvm-svn: 225115
* Minor cleanup to all the switches after MatchInstructionImpl in all the ↵Craig Topper2015-01-038-29/+20
| | | | | | | | AsmParsers. Make sure they all have llvm_unreachable on the default path out of the switch. Remove unnecessary "default: break". Remove a 'return' after unreachable. Fix some indentation. llvm-svn: 225114
* Fix some formatting in tablegen output.Craig Topper2015-01-031-7/+4
| | | | llvm-svn: 225113
* Replace some 'unreachable' comments with llvm_unreachable.Craig Topper2015-01-031-2/+2
| | | | llvm-svn: 225112
* Remove TSAN_DEBUG in favor of SANITIZER_DEBUG.Alexey Samsonov2015-01-0318-38/+54
| | | | llvm-svn: 225111
* Replace DCHECK with DCHECK_LE where appropriate.Alexey Samsonov2015-01-031-4/+4
| | | | llvm-svn: 225110
* ValueTracking: Make computeKnownBits for Arguments a little more clearDavid Majnemer2015-01-031-0/+3
| | | | | | | | | | | We would sometimes leave the out-param APInts untouched while going through computeKnownBits. While I don't know of a way to trigger a bug involving this in practice, it goes against the overall design of computeKnownBits. Found via code inspection. llvm-svn: 225109
* [asan/tracing] extend the test a bit more, simplify the tracing code, add a ↵Kostya Serebryany2015-01-032-20/+33
| | | | | | guard page to trace array, fix the trace IDs before dumping llvm-svn: 225108
* [asan] extend coverage-tracing.cc testKostya Serebryany2015-01-031-11/+35
| | | | llvm-svn: 225107
* [PowerPC] Add support for the CMPB instructionHal Finkel2015-01-0312-9/+538
| | | | | | | | | | | | | | Newer POWER cores, and the A2, support the cmpb instruction. This instruction compares its operands, treating each of the 8 bytes in the GPRs separately, returning a 'mask' result of 0 (for false) or -1 (for true) in each byte. Code generation support is added, in the form of a PPCISelDAGToDAG DAG-preprocessing routine, that recognizes patterns close to what the instruction computes (either exactly, or related by a constant masking operation), and generates the cmpb instruction (along with any necessary constant masking operation). This can be expanded if use cases arise. llvm-svn: 225106
* test: correct PE/COFF tests to build under MSVC modeSaleem Abdulrasool2015-01-033-13/+9
| | | | | | | This adjusts the inputs to be compatible with armv7-windows-msvc as well as armv7-windows-itanium. NFC. llvm-svn: 225105
* ReaderWriter: adjust ARM target addresses for execSaleem Abdulrasool2015-01-037-1/+186
| | | | | | | | | | | | ARM NT assumes a THUMB only environment. As such, any address that is detected as residing in an executable section is adjusted to have its bottom bit set to indicate THUMB in case of a mode exchange. Although the testing here seems insufficient (missing the negative cases) the existing test cases for the IMAGE_REL_ARM_{ADDR32,MOV32T} are relevant as they ensure that we do not incorrectly set the bit. llvm-svn: 225104
* [asan] simplify the tracing code, make it use the same guard variables as ↵Kostya Serebryany2015-01-034-70/+31
| | | | | | coverage llvm-svn: 225103
* Remove -Werror from test.Rafael Espindola2015-01-031-2/+2
| | | | | | | It is not needed since we FileCheck for the warning and -Werror itself can end up unused. llvm-svn: 225102
* Really don't warn about -flto/fno-lto :-(Rafael Espindola2015-01-032-8/+28
| | | | | | This should fix the last bots. llvm-svn: 225100
* [X86] Disassembler support for move to/from %rax with a 32-bit memory offset ↵Craig Topper2015-01-037-4/+48
| | | | | | is REX.W and AdSize prefix are both present. llvm-svn: 225099
* [X86] Use 32-bit sign extended immediate for 64-bit LOCK_ArithBinOp with ↵Craig Topper2015-01-031-6/+6
| | | | | | sign extended immediate. llvm-svn: 225098
* [PM] Add proper documentation for the ModulePassManager andChandler Carruth2015-01-021-0/+40
| | | | | | | | | | | | | | FunctionPassManager. These never got documented, likely due to the clutter of this header file. This fixes another problem people noticed when they started trying to use the new pass manager. I've also used this to document the aspirational constraints I would like to hold passes to. I don't really have a better place to document such things at this point, but eventually will probably create a proper .rst file and page for the LLVM pass infrastructure that carries such high-level concerns. llvm-svn: 225097
* [PM] Actually include the correct file name. Sorry for the breakage.Chandler Carruth2015-01-021-1/+1
| | | | llvm-svn: 225096
* Also avoid warning on -flto/-fno-lto on linux.Rafael Espindola2015-01-021-2/+7
| | | | | | | On OS X a .s file is preprocessed, it is not on linux, which is why the warning was still showing up on linux but not OS X. llvm-svn: 225095
* [PM] Lift the majority of the template boilerplate used to implement theChandler Carruth2015-01-022-306/+343
| | | | | | | | | | | | | | | concept-based polymorphism in the pass manager to a separate header. I got feedback from someone reading the code and trying to use it that this was really making it hard to dive in and start using these APIs and that makes a lot of sense. This only requires a moderate amount of gymnastics to separate in this way, namely rinsing the PreservedAnalysis object through a template argument in a few places so that it is dependent and we only examine it on instantiation. llvm-svn: 225094
* Don't warn on unused -fno-lto.Rafael Espindola2015-01-022-2/+6
| | | | | | | It is somewhat common for CFLAGS to be used with .s files. We were already ignoring -flto. This patch just does the same for -fno-lto. llvm-svn: 225093
* [PM] Fix some formatting where clang-format has improved recently.Chandler Carruth2015-01-022-6/+7
| | | | llvm-svn: 225092
* DebugInfo: Provide a less subtle way to set the debug location of simple ret ↵David Blaikie2015-01-025-17/+23
| | | | | | | | instructions un-XFAILing the test XFAIL'd in r225086 after it regressed in r225083. llvm-svn: 225090
* Driver: honour the clang-cl behaviour on ARM as wellSaleem Abdulrasool2015-01-021-3/+4
| | | | | | | | | | Unfortunately, MSVC does not indicate to the driver what target is being used. This means that we cannot correctly select the target architecture for the clang_rt component. This breaks down when targeting windows with the clang driver as opposed to the clang-cl driver. This should fix the native ARM buildbot tests. llvm-svn: 225089
* Revert "Revert r224736: "[Sanitizer] Make CommonFlags immutable after ↵Alexey Samsonov2015-01-028-33/+69
| | | | | | | | | | | | | | | | initialization."" Fix test failures by introducing CommonFlags::CopyFrom() to make sure compiler doesn't insert memcpy() calls into runtime code. Original commit message: Protect CommonFlags singleton by adding const qualifier to common_flags() accessor. The only ways to modify the flags are SetCommonFlagsDefaults(), ParseCommonFlagsFromString() and OverrideCommonFlags() functions, which are only supposed to be called during initialization. llvm-svn: 225088
* Driver: reuse getCompilerRT in place of addSanitizerRTWindowsSaleem Abdulrasool2015-01-021-16/+16
| | | | | | | | | | | The logic for addSanitizerRTWindows was performing the same logical operation as getCompilerRT, which was previously fully generalised for Linux and Windows. This avoids having a duplication of the logic for building up the name of a clang_rt component. This change does move the current limitation for Windows into getArchNameForCompilerRTLib, where it is assumed that the architecture for Windows is always i386. llvm-svn: 225087
* Temporarily XFAIL fallout from r225083 while investigating.David Blaikie2015-01-021-0/+5
| | | | | | | | | | | | Between this behavior and that fixed by r225083/r225000, I'll take the latter over the former for now, but I'm immediately working on understanding/addressing this behavior too. (the fact that the code change in r225083 caused this change in behavior is a bit troubling anyway - given that it looks & claims to be just a preformance thing) llvm-svn: 225086
* DebugInfo: Remove some now-unnecessary location handling around function ↵David Blaikie2015-01-022-11/+0
| | | | | | | | | | | | | | arguments. r225000 generalized debug info line info handling for expressions such that this code is no longer necessary. This removes the last use of CGDebugInfo::getLocation, but not all the uses of CGDebugInfo::CurLoc, which is still used internally in CGDebugInfo. I'd like to do away with all of that & might succeed after a few more patches. llvm-svn: 225085
* Reformat statepoint documentation and fix a couple of typosPhilip Reames2015-01-021-87/+287
| | | | | | Patch by Ramkumar Ramachandra <artagnon@gmail.com>. llvm-svn: 225084
* DebugInfo: Fix cases where location failed to be updated after r225000David Blaikie2015-01-023-15/+11
| | | | | | | | | | | | | The optimization (that appears to have been here since the earliest implementation (r50848) & has become more complicated over the years) to avoid recreating the debugloc if it would be the same was out of date because ApplyDebugLocation was not re-updating the CurLoc/PrevLoc. This optimization doesn't look terribly beneficial/necessary, so I'm removing it - if it turns up in benchmarks, I'm happy to reconsider/reimplement this with justification, but for now it just seems to add complexity/problems. llvm-svn: 225083
* ReaderWriter: teach the writer about IMAGE_REL_ARM_BRANCH24TSaleem Abdulrasool2015-01-024-1/+91
| | | | | | | | | | This adds support for IMAGE_REL_ARM_BRANCH24T relocations. Similar to the IMAGE_REL_ARM_BLX32T relocation, this relocation requires munging an instruction. The instruction encoding is quite similar, allowing us to reuse the same munging implementation. This is needed by the entry point stubs for modules provided by MSVCRT. llvm-svn: 225082
* ReaderWriter: teach the writer about IMAGE_REL_ARM_BLX23TSaleem Abdulrasool2015-01-024-0/+119
| | | | | | | | | This adds support for IMAGE_REL_ARM_BLX23T relocations. Similar to the IMAGE_REL_ARM_MOV32T relocation, this relocation requires munging an instruction. This inches us closer to supporting a basic hello world application. llvm-svn: 225081
* Improved comments. No functional change intended.Andrea Di Biagio2015-01-021-2/+2
| | | | llvm-svn: 225080
* Revert r224736: "[Sanitizer] Make CommonFlags immutable after initialization."Chandler Carruth2015-01-027-57/+33
| | | | | | | | | | We've got some internal users that either aren't compatible with this or have found a bug with it. Either way, this is an isolated cleanup and so I'm reverting it to un-block folks while we investigate. Alexey and I will be working on fixing everything up so this can be re-committed soon. Sorry for the noise and any inconvenience. llvm-svn: 225079
OpenPOWER on IntegriCloud