summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [RS4GC] Better codegen for deoptimize callsSanjoy Das2016-04-052-18/+66
| | | | | | | | | Don't emit a gc.result for a statepoint lowered from @llvm.experimental.deoptimize since the call into __llvm_deoptimize is effectively noreturn. Instead follow the corresponding gc.statepoint with an "unreachable". llvm-svn: 265485
* [Target] Remove a deprecated comment.Quentin Colombet2016-04-051-2/+1
| | | | llvm-svn: 265484
* [Target] Add an accessor to the register bank information.Quentin Colombet2016-04-051-0/+5
| | | | llvm-svn: 265483
* Swift Calling Convention: swiftcc for ARM.Manman Ren2016-04-055-0/+205
| | | | | | Differential Revision: http://reviews.llvm.org/D18769 llvm-svn: 265482
* Faster stack-protector for Android/AArch64.Evgeniy Stepanov2016-04-058-33/+90
| | | | | | | Bionic has a defined thread-local location for the stack protector cookie. Emit a direct load instead of going through __stack_chk_guard. llvm-svn: 265481
* Swift Calling Convention: add swiftcc.Manman Ren2016-04-059-0/+232
| | | | | | Differential Revision: http://reviews.llvm.org/D17863 llvm-svn: 265480
* [RegisterBank] Implement the verify method to check for the obvious mistakes.Quentin Colombet2016-04-051-4/+27
| | | | llvm-svn: 265479
* Delete broken code.Rafael Espindola2016-04-054-10/+27
| | | | | | | | | A synthetic symbol can be global or local, and with the current infrastructure we don't need any special code for it. Fixes PR27228. llvm-svn: 265478
* [lld][MachO] Check Expected<T> for error prior to destruction.Lang Hames2016-04-051-15/+17
| | | | | | This should fix the failures on the LLD bots caused by r265446. llvm-svn: 265477
* Revert "XFail TestImport.py on Windows because Python 3 import rules don't ↵Adrian McCarthy2016-04-051-1/+0
| | | | | | | | work that way." This reverts commit e5f0ba4fcf977ad6baaaca700d3646675cdac19b. llvm-svn: 265476
* [RegisterBankInfo] Add debug print to check how the initialization is going.Quentin Colombet2016-04-051-0/+11
| | | | llvm-svn: 265475
* [CFLAA] Fix PR27213; incorrect tagging of args/globalsGeorge Burgess IV2016-04-053-6/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch, CFLAA wouldn't tag arguments/globals properly if it didn't find any "interesting" edges on them. This means that, if all you do is store constants to a global or argument, we would never actually treat it as a global/argument. Test case: define void @foo(i32* %A, i32* %B) #0 { entry: store i32 0, i32* %A, align 4 store i32 0, i32* %B, align 4 ret void } CFLAA would say that %A can't alias %B, because neither pointer was used in an interesting way. This patch makes us note whether something is an argument, global, ... regardless of how interesting CFLAA thinks its uses are. (For the record, using a value in an interesting way means loading from it, using it in a GEP, ...) llvm-svn: 265474
* [RegisterBank] Add printable capabilities for future debugging.Quentin Colombet2016-04-052-0/+52
| | | | llvm-svn: 265473
* Add a test for relocations in non alloc sections.Rafael Espindola2016-04-051-0/+25
| | | | | | We already got this right, but we were not testing it. llvm-svn: 265471
* Try harder to appease MSVC after r265456Duncan P. N. Exon Smith2016-04-051-3/+12
| | | | | | r265465 wasn't good enough. I need to spell out all the moves. llvm-svn: 265470
* [RegisterBankInfo] Make addRegBankCoverage more capable to easeQuentin Colombet2016-04-052-6/+72
| | | | | | | | targeting jobs. Now, addRegBankCoverage also adds the subreg-classes not just the sub-classes of the given register class. llvm-svn: 265469
* Minor code cleanups. NFC.Junmo Park2016-04-051-2/+2
| | | | llvm-svn: 265468
* Fix a crash on invalid with template handlingRichard Trieu2016-04-054-8/+20
| | | | | | | | This is a fix for https://llvm.org/bugs/show_bug.cgi?id=25561 which was a crash on invalid. Change the handling of invalid decls to have a catch-all case to prevent unexpecting decls from triggering an assertion. llvm-svn: 265467
* IR: Introduce ConstantAggregate, NFCDuncan P. N. Exon Smith2016-04-059-85/+77
| | | | | | | | | | | | Add a common parent class for ConstantArray, ConstantVector, and ConstantStruct called ConstantAggregate. These are the aggregate subclasses of Constant that take operands. This is mainly a cleanup, adding common `isa` target and removing duplicated code. However, it also simplifies caching which constants point transitively at `GlobalValue` (a possible future direction). llvm-svn: 265466
* Try to appease MSVC after r265456Duncan P. N. Exon Smith2016-04-051-0/+4
| | | | | | | I can't remember if adding `= default` will make MSVC happy, or if I have to spell this out. Let's try the cleaner version first. llvm-svn: 265465
* [RegisterBankInfo] Implement the methods to create register banks.Quentin Colombet2016-04-052-9/+120
| | | | llvm-svn: 265464
* IR: Add missing assertion for ConstantVector::ConstantVectorDuncan P. N. Exon Smith2016-04-051-0/+2
| | | | | | | Use the same assertion as ConstantArray. Vectors should have the right number of elements. llvm-svn: 265463
* Make TLS work for PIE executables on x86-64.Ed Schouten2016-04-052-0/+28
| | | | | | | | | | | | | | | | | While trying to get PIE work on CloudABI for x86-64, I noticed that even though GNU ld would generate functional binaries, LLD would not. It turns out that we generate relocations for referencing TLS objects inside of the text segment, which shouldn't happen. This change extends the isRelRelative() function to list some additional relocation types that should be treated as relative. This makes my C library unit testing binary work on x86-64. Approved by: ruiu Differential Revision: http://reviews.llvm.org/D18688 Fixes bug: https://llvm.org/bugs/show_bug.cgi?id=27174 llvm-svn: 265462
* XFail TestImport.py on Windows because Python 3 import rules don't work that ↵Adrian McCarthy2016-04-051-0/+1
| | | | | | way. llvm-svn: 265461
* [RegisterBank] Provide a way to check if a register bank is valid.Quentin Colombet2016-04-052-3/+25
| | | | | | | | Change the default constructor to create invalid object. The target will have to properly initialize the register banks before using them. llvm-svn: 265460
* Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining ↵Duncan P. N. Exon Smith2016-04-0530-523/+323
| | | | | | | | | | files; other minor fixes." This reverts commit r265454 since it broke the build. E.g.: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/ llvm-svn: 265459
* Make constructors for final subclasses of Constant private, NFCDuncan P. N. Exon Smith2016-04-051-27/+20
| | | | | | | These were `protected` before, but might as well be `private`. Also marked the classes themselves `final`. llvm-svn: 265458
* llvm-dwp: Handle GCC's use of multiple debug_types.dwo sections in a single ↵David Blaikie2016-04-052-31/+41
| | | | | | | | .dwo file (also includes the .test file missing from my previous commit, r265452) llvm-svn: 265457
* ValueMapper: Rewrite Mapper::mapMetadata without recursionDuncan P. N. Exon Smith2016-04-052-108/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit completely rewrites Mapper::mapMetadata (the implementation of llvm::MapMetadata) using an iterative algorithm. The guts of the new algorithm are in MDNodeMapper::map, the entry function in a new class. Previously, Mapper::mapMetadata performed a recursive exploration of the graph with eager "just in case there's a reason" malloc traffic. The new algorithm has these benefits: - New nodes and temporaries are not created eagerly. - Uniquing cycles are not duplicated (see new unit test). - No recursion. Given a node to map, it does this: 1. Use a worklist to perform a post-order traversal of the transitively referenced unmapped nodes. 2. Track which nodes will change operands, and which will have new addresses in the mapped scheme. Propagate the changes through the POT until fixed point, to pick up uniquing cycles that need to change. 3. Map all the distinct nodes without touching their operands. If RF_MoveDistinctMetadata, they get mapped to themselves; otherwise, they get mapped to clones. 4. Map the uniqued nodes (bottom-up), lazily creating temporaries for forward references as needed. 5. Remap the operands of the distinct nodes. Mehdi helped me out by profiling this with -flto=thin. On his workload (importing/etc. for opt.cpp), MapMetadata sped up by 15%, contributed about 50% less to persistent memory, and made about 100x fewer calls to malloc. The speedup is less than I'd hoped. The profile mainly blames DenseMap lookups; perhaps there's a way to reduce them (e.g., by disallowing remapping of MDString). It would be nice to break the strange remaining recursion on the Value side: MapValue => materializeInitFor => RemapInstruction => MapValue. I think we could do this by having materializeInitFor return a worklist of things to be remapped. llvm-svn: 265456
* [TargetRegisterClass] Improve the comment for how to use getSubClassMask.Quentin Colombet2016-04-051-2/+15
| | | | llvm-svn: 265455
* Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; ↵Eugene Zelenko2016-04-0530-323/+523
| | | | | | | | | | | | other minor fixes. Some Include What You Use suggestions were used too. Use anonymous namespaces in source files. Differential revision: http://reviews.llvm.org/D18778 llvm-svn: 265454
* Don't omit dynamic relocations for the GOT.Ed Schouten2016-04-052-3/+22
| | | | | | | | | | | | | | | | | | | | | Where Clang's AArch64 backend seems to differ from the X86 backend is that it tends to use the GOT more aggressively. After getting CloudABI PIEs working on x86-64, I noticed that accessing global variables would still crash on aarch64. Tracing it down, it turns out that the GOT was filled with entries assuming the base address was zero. It turns out that we skip generating relocations for GOT entries in case the relocation pointing towards the GOT is relative. Whether the thing pointing to the GOT is absolute or relative shouldn't make any difference; the GOT entry itself should contain the absolute address, thus needs a relocation regardless. Approved by: rafael Differential Revision: http://reviews.llvm.org/D18739 llvm-svn: 265453
* llvm-dwp: Handle dwo files produced by GCCDavid Blaikie2016-04-052-4/+8
| | | | | | | To start with, handle DW_FORM_string names. Follow up commit will handle the interesting quirk with type units I was originally aiming for here. llvm-svn: 265452
* [llvm-rtdyld] Fix the return type on ErrorAndExit.Lang Hames2016-04-051-1/+1
| | | | | | As suggested by Rafael - this function no longer returns a value as of r264425. llvm-svn: 265451
* [X86] Reuse EFLAGS and form LOCKed ops when only user is SETCC.Ahmed Bougacha2016-04-052-30/+81
| | | | | | | | | | | | | | | | | | | | We only generate LOCKed versions of add/sub when the result is unused. It often happens that the result is used, but only by a comparison. We can optimize those out by reusing EFLAGS, which lets us use the proper instructions, instead of having to fallback to LXADD. Instead of doing this as an MI peephole (as we do for the other non-LOCKed (really, non-MR) forms), do it in ISel. It becomes quite tricky later. This also makes it eventually possible to stop expanding and/or/xor if the only user is an icmp (also see D18141). This uses the LOCK ISD opcodes added by r262244. Differential Revision: http://reviews.llvm.org/D17633 llvm-svn: 265450
* [GlobalISel] Add the RegisterBankInfo class for the handling of register banks.Quentin Colombet2016-04-053-0/+81
| | | | llvm-svn: 265449
* [X86] Add tests for ATOMIC_LOAD_OP EFLAGS reuse. NFC.Ahmed Bougacha2016-04-051-0/+159
| | | | llvm-svn: 265448
* [X86] Simplify early-exit check. NFC.Ahmed Bougacha2016-04-051-4/+4
| | | | llvm-svn: 265447
* [Support] Add a checked flag to Expected<T>, require checks before access orLang Hames2016-04-052-27/+136
| | | | | | | | | | destruction. This makes the Expected<T> class behave like Error, even when in success mode. Expected<T> values must be checked to see whether they contain an error prior to being dereferenced, assigned to, or destructed. llvm-svn: 265446
* [GlobalISel] Add a class, RegisterBank, to represent register banks.Quentin Colombet2016-04-053-0/+108
| | | | llvm-svn: 265445
* fixed to discard earlier advertisingSanjay Patel2016-04-051-3/+4
| | | | | | | Also, hardcode (there must be a better way...) the 'utils' dir in the advertisement, so it's easier to find. llvm-svn: 265444
* Fix a crasher that could happen if ClangASTSource::CompleteType() found a ↵Greg Clayton2016-04-051-3/+3
| | | | | | | | type whose name matched, but came from a different language. We need to verify that any types we find are clang types before trying to extra a clang::QualType and then use it. <rdar://problem/24138711> llvm-svn: 265443
* fix typo; NFCSanjay Patel2016-04-051-1/+1
| | | | llvm-svn: 265442
* [AArch64][Test] Do not override the suffixes for test cases.Quentin Colombet2016-04-052-3/+1
| | | | llvm-svn: 265441
* [GlobalISel] Add the skeleton of the RegBankSelect pass.Quentin Colombet2016-04-055-0/+146
| | | | | | | This pass is reponsible for assigning the generic virtual registers to register banks. llvm-svn: 265440
* Fix broken tests from no-jump-table commitNirav Dave2016-04-056-17/+21
| | | | | | | | | | | | Summary: Fix failing tests from no-jump-table flag addition Reviewers: jyknight Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18801 llvm-svn: 265439
* [Support] clang-format Error.h.Lang Hames2016-04-051-22/+13
| | | | | | This tidies up the ExitOnError class and some other recently added code. NFC. llvm-svn: 265438
* [STATS] Remove trailing whitespace in stats source filesJonathan Peyton2016-04-054-40/+40
| | | | llvm-svn: 265437
* [CUDA] Show --cuda-gpu-arch option in clang --help.Justin Lebar2016-04-051-2/+2
| | | | | | For some reason it was hidden. llvm-svn: 265436
* [CUDA] Add -fcuda-flush-denormals-to-zero.Justin Lebar2016-04-057-0/+46
| | | | | | | | | | | | | | | | | | Summary: Setting this flag causes all functions are annotated with the "nvvm-f32ftz" = "true" attribute. In addition, we annotate the module with "nvvm-reflect-ftz" set to 0 or 1, depending on whether -cuda-flush-denormals-to-zero is set. This is read by the NVVMReflect pass. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18671 llvm-svn: 265435
OpenPOWER on IntegriCloud