summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Added a testcase for defining and using lambdas in the expression parser.Sean Callanan2016-04-152-0/+21
| | | | | | <rdar://problem/25739133> llvm-svn: 266397
* [ParallelCG] Attempt to placate MSVC.Davide Italiano2016-04-151-0/+2
| | | | llvm-svn: 266396
* clang-cl: Make /link accept an optional joined argument.Hans Wennborg2016-04-152-3/+4
| | | | | | | | | | For example, "cl.exe a.c /linkfoo bar" is a valid invocation and forwards "foo" and "bar" to link.exe. This makes clang-cl handle that kind of invocation. Depends on LLVM r266394. llvm-svn: 266395
* Option parser: class for consuming a joined arg in addition to all remaining ↵Hans Wennborg2016-04-156-1/+73
| | | | | | args llvm-svn: 266394
* OptionParsingTest.cpp: reorder EXPECT_EQs to put expectation on the left. NFC.Hans Wennborg2016-04-151-25/+25
| | | | | | | This provides for better error messages from the framework when the expected and actual values don't match. llvm-svn: 266393
* Initial support for reading type information from PDBs.Zachary Turner2016-04-1511-20/+844
| | | | | | | | | | | | | | | | This implements a PDBASTParser and corresponding logic in SymbolFilePDB to do type lookup by name. This is just a first pass and leaves many aspects of type lookup unimplemented, and just focuses on laying the framework. With this patch, you should be able to lookup basic types by name from a PDB. Full class definitions are not completed yet, we will instead just return a forward declaration of the class. Differential Revision: http://reviews.llvm.org/D18848 Reviewed by: Greg Clayton llvm-svn: 266392
* Delete a dead repl.Rafael Espindola2016-04-151-1/+1
| | | | | | It is only ever used on symbols taken from the symbol table. llvm-svn: 266391
* [LTO] Add a new splitCodeGen() API which takes a TargetMachineFactory.Davide Italiano2016-04-152-20/+39
| | | | | | | | | This will be used in lld to avoid creating TargetMachine in two different places. See D18999 for a more detailed discussion. Differential Revision: http://reviews.llvm.org/D19139 llvm-svn: 266390
* Added a testcase for defining and using a block in the expression parser.Sean Callanan2016-04-151-3/+13
| | | | | | <rdar://problem/25738696> llvm-svn: 266389
* Fix StaticAnalyzer complaints. NFC.George Burgess IV2016-04-141-2/+4
| | | | | | | | | | | | | | | Clang's StaticAnalyzer seems to (correctly) complain about code like: T *p = calloc(sizeof(U), N); ...Where T and U are different types. This patch removes some instances of this pattern from compiler-rt. Patch by Apelete Seketeli. Differential Revision: http://reviews.llvm.org/D19085 llvm-svn: 266388
* Lit C++11 Compatibility Patch #8Charles Li2016-04-1424-92/+529
| | | | | | 24 tests have been updated for C++11 compatibility. llvm-svn: 266387
* [test] Require 'asserts' for a test which uses -debug-onlyVedant Kumar2016-04-141-0/+1
| | | | | | | Without this line, bots which run check-all on Release compilers will break. llvm-svn: 266386
* AMDGPU: Remove custom load/store scalarizationMatt Arsenault2016-04-144-87/+7
| | | | llvm-svn: 266385
* Don't disable stdin buffering on WindowsAdrian McCarthy2016-04-141-6/+5
| | | | | | | | Disabling buffering exposes a bug in the MS VS 2015 CRT implementation of fgets, where you sometimes have to hit Enter twice, depending on if the input had an odd or even number of characters. This was hidden until a few days ago by the Python initialization which was re-enabling buffering on the streams. A few days ago, Enrico make the Python initialization on-demand, which exposed this problem. llvm-svn: 266384
* AMDGPU: Add test for generic builtin behaviorMatt Arsenault2016-04-141-0/+16
| | | | llvm-svn: 266383
* AMDGPU: Include LDS size in printed commentMatt Arsenault2016-04-142-4/+12
| | | | llvm-svn: 266382
* [AliasSetTracker] Correctly handle changing the size of an entryMichael Kuperstein2016-04-143-20/+64
| | | | | | | | | | | | | If the size of an AST entry changes, we also need to make sure we perform necessary alias set merges, as the new size may overlap pointers in other sets. We happen to run into this with memset, because memset allows an entry for a i8* pointer to have a decidedly non-i8 size. This fixes PR27262. Differential Revision: http://reviews.llvm.org/D18939 llvm-svn: 266381
* Nuke getGlobalContext() from LLVM (but the C API)Mehdi Amini2016-04-143-14/+4
| | | | | | | | | | The only use for getGlobalContext() is in the C API. Let's just move the static global here and nuke the C++ API. Differential Revision: http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266380
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-1480-1079/+1108
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* AMDGPU: Run SIFoldOperands after PeepholeOptimizerMatt Arsenault2016-04-1417-46/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PeepholeOptimizer cleans up redundant copies, which makes the operand folding more effective. shader-db stats: Totals: SGPRS: 34200 -> 34336 (0.40 %) VGPRS: 22118 -> 21655 (-2.09 %) Code Size: 632144 -> 633460 (0.21 %) bytes LDS: 11 -> 11 (0.00 %) blocks Scratch: 10240 -> 11264 (10.00 %) bytes per wave Max Waves: 8822 -> 8918 (1.09 %) Wait states: 0 -> 0 (0.00 %) Totals from affected shaders: SGPRS: 7704 -> 7840 (1.77 %) VGPRS: 5169 -> 4706 (-8.96 %) Code Size: 234444 -> 235760 (0.56 %) bytes LDS: 2 -> 2 (0.00 %) blocks Scratch: 0 -> 1024 (0.00 %) bytes per wave Max Waves: 1188 -> 1284 (8.08 %) Wait states: 0 -> 0 (0.00 %) Increases: SGPRS: 35 (0.01 %) VGPRS: 1 (0.00 %) Code Size: 59 (0.02 %) LDS: 0 (0.00 %) Scratch: 1 (0.00 %) Max Waves: 48 (0.02 %) Wait states: 0 (0.00 %) Decreases: SGPRS: 26 (0.01 %) VGPRS: 54 (0.02 %) Code Size: 68 (0.03 %) LDS: 0 (0.00 %) Scratch: 0 (0.00 %) Max Waves: 4 (0.00 %) Wait states: 0 (0.00 %) llvm-svn: 266378
* AMDGPU: Directly emit m0 initialization with s_mov_b32Matt Arsenault2016-04-142-14/+37
| | | | | | | | | | | | | Currently what comes out of instruction selection is a register initialized to -1, and then copied to m0. MachineCSE doesn't consider copies, but we want these to be CSEed. This isn't much of a problem currently, because SIFoldOperands is run immediately after. This avoids regressions when SIFoldOperands is run later from leaving all copies to m0. llvm-svn: 266377
* AMDGPU: Fold bitcasts of scalar constants to vectorsMatt Arsenault2016-04-145-50/+83
| | | | | | | This cleans up some messes since the individual scalar components can be CSEed. llvm-svn: 266376
* Do not use llvm::getGlobalContext().Rui Ueyama2016-04-143-5/+7
| | | | llvm-svn: 266375
* Revert "Do not use llvm::getGlobalContext(), trying to nuke it from LLVM"Mehdi Amini2016-04-142-4/+2
| | | | | | | | This reverts commit r266365 and r266367, the contexts in the two places have to match. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266373
* [ScheduleDAGInstrs] Re-factor for based on review feedback. NFC.Geoff Berry2016-04-142-54/+52
| | | | | | | | | | | | | | Summary: Re-factor some code to improve clarity and style based on review comments from http://reviews.llvm.org/D18093. Reviewers: MatzeB, mcrosier Subscribers: MatzeB, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19128 llvm-svn: 266372
* [sanitizer] [SystemZ] Fix stack traces.Marcin Koscielnicki2016-04-141-0/+2
| | | | | | | | | | | | | | | | | | | On s390, the return address is in %r14, which is saved 14 words from the frame pointer. Unfortunately, there's no way to do a proper fast backtrace on SystemZ with current LLVM - the saved %r15 in fixed-layout register save area points to the containing frame itself, and not to the next one. Likewise for %r11 - it's identical to %r15, unless alloca is used (and even if it is, it's still useless). There's just no way to determine frame size / next frame pointer. -mbackchain would fix that (and make the current code just work), but that's not yet supported in LLVM. We will thus need to XFAIL some asan tests (Linux/stack-trace-dlclose.cc, deep_stack_uaf.cc). Differential Revision: http://reviews.llvm.org/D18895 llvm-svn: 266371
* [sanitizer] [SystemZ] Add/fix kernel and libc type definitions.Marcin Koscielnicki2016-04-145-6/+37
| | | | | | | | | | | This is the first part of upcoming asan support for s390 and s390x. Note that there are bits for 31-bit support in this and subsequent patches - while LLVM itself doesn't support it, gcc should be able to make use of it just fine. Differential Revision: http://reviews.llvm.org/D18888 llvm-svn: 266370
* [clang-tidy] Add check misc-multiple-statement-macroSamuel Benzaquen2016-04-147-0/+249
| | | | | | | | | | | | | | | Summary: The check detects multi-statement macros that are used in unbraced conditionals. Only the first statement will be part of the conditionals and the rest will fall outside of it and executed unconditionally. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18766 llvm-svn: 266369
* [ELF][MIPS] Make R_MIPS_LO16 a relative relocation if it references _gp_disp ↵Simon Atanasyan2016-04-143-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | symbol The _gp_disp symbol designates offset between start of function and 'gp' pointer into GOT. The following code is a typical MIPS function preamble used to setup $gp register: lui $gp, %hi(_gp_disp) addi $gp, $gp, %lo(_gp_disp) To calculate R_MIPS_HI16 / R_MIPS_LO16 relocations results we use the following formulas: %hi(_gp - P + A) %lo(_gp - P + A + 4), where _gp is a value of _gp symbol, A is addend, and P current address. The R_MIPS_LO16 relocation references _gp_disp symbol is always the second instruction. That is why we need four byte adjustments. The patch assigns R_PC type for R_MIPS_LO16 relocation and adjusts its addend by 4. That fix R_MIPS_LO16 calculation. For details see p. 4-19 at ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf Differential Revision: http://reviews.llvm.org/D19115 llvm-svn: 266368
* Use fully qualified name to refer to LLVMContextMehdi Amini2016-04-141-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266367
* In vector comparisons, handle scalar LHS just as we handle scalar RHSReid Kleckner2016-04-143-11/+38
| | | | | | | | | | | | Summary: Fixes PR27258 Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19123 llvm-svn: 266366
* Do not use llvm::getGlobalContext(), trying to nuke it from LLVMMehdi Amini2016-04-142-2/+4
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266365
* Specialize the symbol table data structure a bit.Rafael Espindola2016-04-144-14/+19
| | | | | | | | | We never need to iterate over the K,V pairs, so we can avoid copying the key as MapVector does. This is a small speedup on most benchmarks. llvm-svn: 266364
* [ARM] Adding IEEE-754 SIMD detection to loop vectorizerRenato Golin2016-04-146-6/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some SIMD implementations are not IEEE-754 compliant, for example ARM's NEON. This patch teaches the loop vectorizer to only allow transformations of loops that either contain no floating-point operations or have enough allowance flags supporting lack of precision (ex. -ffast-math, Darwin). For that, the target description now has a method which tells us if the vectorizer is allowed to handle FP math without falling into unsafe representations, plus a check on every FP instruction in the candidate loop to check for the safety flags. This commit makes LLVM behave like GCC with respect to ARM NEON support, but it stops short of fixing the underlying problem: sub-normals. Neither GCC nor LLVM have a flag for allowing sub-normal operations. Before this patch, GCC only allows it using unsafe-math flags and LLVM allows it by default with no way to turn it off (short of not using NEON at all). As a first step, we push this change to make it safe and in sync with GCC. The second step is to discuss a new sub-normal's flag on both communitues and come up with a common solution. The third step is to improve the FastMath flags in LLVM to encode sub-normals and use those flags to restrict NEON FP. Fixes PR16275. llvm-svn: 266363
* [InstCombine] remove constant by inverting compare + logic (PR27105)Sanjay Patel2016-04-142-0/+32
| | | | | | | | | | | | | | | https://llvm.org/bugs/show_bug.cgi?id=27105 We can check if all bits outside of a constant mask are set with a single constant. As noted in the bug report, although this form should be considered the canonical IR, backends may want to transform this into an 'andn' / 'andc' comparison against zero because that could be a single machine instruction. Differential Revision: http://reviews.llvm.org/D18842 llvm-svn: 266362
* Fix Xcode project after recent s390x changes.Greg Clayton2016-04-141-0/+44
| | | | llvm-svn: 266361
* Fix null pointer access for discriminator assignment.Dehao Chen2016-04-141-0/+2
| | | | | | | | | | | | Summary: This fixes the buildbot failure. Reviewers: dnovillo, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19129 llvm-svn: 266360
* Make this code less brittle. The benefits of a fixed-size array aren't worth ↵Richard Smith2016-04-141-9/+5
| | | | | | the maintenance cost. llvm-svn: 266359
* Add support for type aliases to modernize-redundant-void-arg.cppAaron Ballman2016-04-143-11/+22
| | | | | | Patch by Clement Courbet. llvm-svn: 266358
* Hash symbol names only once per global SymbolBody.Rafael Espindola2016-04-142-3/+34
| | | | | | | | | | | The DenseMap doesn't store hash results. This means that when it is resized it has to recompute them. This patch is a small hack that wraps the StringRef in a struct that remembers the hash value. That way we can be sure it is only hashed once. llvm-svn: 266357
* AMDGPU: Add skeleton GlobalIsel implementationTom Stellard2016-04-147-0/+156
| | | | | | | | | | | | | | | Summary: This adds the necessary target code to be able to run the ir translator. Lowering function arguments and returns is a nop and there is no support for RegBankSelect. Reviewers: arsenm, qcolombet Subscribers: arsenm, joker.eph, vkalintiris, llvm-commits Differential Revision: http://reviews.llvm.org/D19077 llvm-svn: 266356
* Simplify handling of size relocations. NFC.Rafael Espindola2016-04-143-12/+5
| | | | llvm-svn: 266355
* Update discriminator assignment algorithm to handle nested call correctly.Dehao Chen2016-04-142-20/+64
| | | | | | | | | | | | Summary: Add discriminator for nested call correctly. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19127 llvm-svn: 266354
* Fix off-by-one error in worst-case number of offsets needed for an AST record.Richard Smith2016-04-142-1/+7
| | | | llvm-svn: 266353
* Fix regression in gnu_libstdcpp.py introduced by r266313Ulrich Weigand2016-04-141-1/+1
| | | | | | CreateChildAtOffset needs a byte offset, not an element number. llvm-svn: 266352
* Sink DI metadata usage out of MachineInstr.h and MachineInstrBuilder.hReid Kleckner2016-04-1411-46/+70
| | | | | | | | | | | MachineInstr.h and MachineInstrBuilder.h are very popular headers, widely included across all LLVM backends. It turns out that there only a handful of TUs that actually care about DI operands on MachineInstrs. After this change, touching DebugInfoMetadata.h and rebuilding llc only needs 112 actions instead of 542. llvm-svn: 266351
* [ValueMapper] Range-loopify to improve readability. NFC.Davide Italiano2016-04-141-3/+3
| | | | llvm-svn: 266350
* [lanai] Add custom lowering for SRL_PARTS i32.Jacques Pienaar2016-04-143-1/+56
| | | | llvm-svn: 266349
* [GlobalISel] Move GISelAccessor class into public headersTom Stellard2016-04-144-20/+20
| | | | | | | | | | Reviewers: qcolombet Subscribers: joker.eph, vkalintiris, llvm-commits Differential Revision: http://reviews.llvm.org/D19120 llvm-svn: 266348
* [DivergenceAnalysis] Treat PHI with incoming undef as constantNicolai Haehnle2016-04-145-1/+93
| | | | | | | | | | | | | | | | | | | | | | | Summary: If a PHI has an incoming undef, we can pretend that it is equal to one non-undef, non-self incoming value. This is particularly relevant in combination with the StructurizeCFG pass, which introduces PHI nodes with undefs. Previously, this lead to branch conditions that were uniform before StructurizeCFG to become non-uniform afterwards, which confused the SIAnnotateControlFlow pass. This fixes a crash when Mesa radeonsi compiles a shader from dEQP-GLES3.functional.shaders.switch.switch_in_for_loop_dynamic_vertex Reviewers: arsenm, tstellarAMD, jingyue Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19013 llvm-svn: 266347
OpenPOWER on IntegriCloud