summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Directly compute the right value for R_RELAX_TLS_GD_TO_IE.Rafael Espindola2016-05-202-3/+2
| | | | | | This avoid doing math in Target.cpp to compensate. llvm-svn: 270266
* use FileCheck instead of grep for exact checkingSanjay Patel2016-05-201-5/+10
| | | | llvm-svn: 270265
* Check pc relative relocations too.Rafael Espindola2016-05-202-0/+14
| | | | llvm-svn: 270264
* [esan] Use ModulePass for EfficiencySanitizerPass.Derek Bruening2016-05-202-10/+18
| | | | | | | | | | | | | | | | | Summary: Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to better support global variable creation for a forthcoming struct field counter tool. Patch by Qin Zhao. Reviewers: aizatsky Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc Differential Revision: http://reviews.llvm.org/D20458 llvm-svn: 270263
* pdbdump: print out symbol names referred by publics stream.Rui Ueyama2016-05-209-11/+182
| | | | | | | | | | | | | | | | | | DBI stream contains a stream number of the symbol record stream. Symbol record streams is an array of length-type-value members. Each member represents one symbol. Publics stream contains offsets to the symbol record stream. This patch is to print out all symbols that are referenced by the publics stream. Note that even with this patch, llvm-pdbdump cannot dump all the information in a publics stream since it contains more information than symbol names. I'll improve it in followup patches. Differential Revision: http://reviews.llvm.org/D20480 llvm-svn: 270262
* [OpenCL] Add to_{global|local|private} builtin functions.Yaxun Liu2016-05-206-0/+230
| | | | | | | | | | | | | | | | | | OpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e. global gentype *to_global(gentype *p); It is not desirable to declare it as global void *to_global(void *); in opencl header file since it misses diagnostics. This patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument. In codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library. Differential Revision: http://reviews.llvm.org/D19932 llvm-svn: 270261
* Use report_fatal_error after allKrzysztof Parzyszek2016-05-201-1/+1
| | | | | | | | Depending on the compiler used to build LLVM, llvm_unreachable can either expand to a call to abort(), or to a __builtin_unreachable. The latter does not have a predictable behavior at runtime. llvm-svn: 270260
* LiveIntervalAnalysis: Fix missing defs in renameDisconnectedComponents().Matthias Braun2016-05-205-17/+97
| | | | | | | | | | | | | | Fix renameDisconnectedComponents() creating vreg uses that can be reached from function begin withouthaving a definition (or explicit live-in). Fix this by inserting IMPLICIT_DEF instruction before control-flow joins as necessary. Removes an assert from MachineScheduler because we may now get additional IMPLICIT_DEF when preparing the scheduling policy. This fixes the underlying problem of http://llvm.org/PR27705 llvm-svn: 270259
* CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.Peter Collingbourne2016-05-202-5/+2
| | | | | | | | | This gives AsmPrinter a chance to initialize its DD field before we call beginModule(), which is about to start using it. Differential Revision: http://reviews.llvm.org/D20413 llvm-svn: 270258
* CodeGen: Do not require a MachineFunction just to create a DIEDwarfExpression.Peter Collingbourne2016-05-206-41/+49
| | | | | | | | | We are about to start using DIEDwarfExpression to create global variable DIEs, which happens before we generate code for functions. Differential Revision: http://reviews.llvm.org/D20412 llvm-svn: 270257
* [esan] Add custom flag supportDerek Bruening2016-05-205-17/+126
| | | | | | | | | | | | | | | Summary: Adds custom flag support to EfficiencySanitizer's runtime library. Adds an initial flag cache_line_size which will be used by multiple tools. Reviewers: aizatsky, vitalybuka Subscribers: llvm-commits, eugenis, kcc, zhaoqin, aizatsky, kubabrecka Differential Revision: http://reviews.llvm.org/D20478 llvm-svn: 270256
* [esan] Extend shadow mapping to cover low librariesDerek Bruening2016-05-204-22/+39
| | | | | | | | | | | | | | | Summary: Adds support for app libraries starting slightly below 0x7f00'00000000 (the mmap ASLR range extends down to 0x7efb'f8000000 for reasonable stack limits) by switching to a shadow mapping offset of 0x1300'00000000. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D20479 llvm-svn: 270255
* Adopt mmap flags that allow mmap'ed memory to be less crash prone.Greg Clayton2016-05-201-2/+25
| | | | | | | | | | On Darwin if a mmap file is code signed and the code signature is invalid, it used to crash. If we specify the MAP_RESILIENT_CODESIGN mmap flag when mapping a file for reading, we can avoid crashing. Another mmap flag named MAP_RESILIENT_MEDIA allows us to survive if we mmap files that are on removable media like network servers or removable hard drives. If a file was mapped and later the media that had the file became unavailable, we would crash when we would touch the next page that wasn't paged in. Now it will return zeroes and stop of from us from crashing. <rdar://problem/25918698> llvm-svn: 270254
* CODE_OWNERS: Take ownership of SelectionDAGJustin Bogner2016-05-201-4/+1
| | | | | | Owen no longer has time to tend to the yaks in SelectionDAG. llvm-svn: 270253
* Remove trailing whitespace in src/ directoryJonathan Peyton2016-05-2031-163/+163
| | | | | | This patch doesn't affect D19878's context. So D19878 still cleanly applies. llvm-svn: 270252
* [AArch64] Disable narrow load merge by defaultJun Bum Lim2016-05-202-4/+4
| | | | | | | | | | | | | | Summary: As this optimization converts two loads into one load with two shift instructions, it could potentially hurt performance if a loop is arithmetic operation intensive. Reviewers: t.p.northover, mcrosier, jmolloy Subscribers: evandro, jmolloy, aemerson, rengolin, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D20172 llvm-svn: 270251
* Functions with differing phis should not be merged.Mark Lacey2016-05-202-0/+61
| | | | | | | | | | | Check that the incoming blocks of phi nodes are identical, and block function merging if they are not. rdar://problem/26255167 Differential Revision: http://reviews.llvm.org/D20462 llvm-svn: 270250
* [RegBankSelect] Look for the best mapping in greedy mode.Quentin Colombet2016-05-202-10/+45
| | | | | | | | | The Fast mode takes the first mapping, the greedy mode loops over all the possible mapping for an instruction and choose the cheaper one. Test case will come with target specific code, since we currently do not have instructions that have several mappings. llvm-svn: 270249
* [MachOYAML] Removing duplicated field from LC_UUID YAMLChris Bieneman2016-05-203-4/+0
| | | | | | The uuid_command was duplicating the load_command.cmdsize field. This removes the duplicate from the YAML mapping and from the test cases. llvm-svn: 270248
* [RegBankSelect] Get rid of a now dead method: setSafeInsertPoint.Quentin Colombet2016-05-202-39/+0
| | | | | | This is now encapsulated in the RepairingPlacement class. llvm-svn: 270247
* [X86] Reduce memory allocations in X86TargetMachine::getSubtargetImplDavid Majnemer2016-05-203-10/+15
| | | | | | | | We performed a number of memory allocations each time getTTI was called, remove them by using SmallString. No functionality change intended. llvm-svn: 270246
* [RegBankSelect] Take advantage of a potential best cost information inQuentin Colombet2016-05-202-4/+24
| | | | | | | | | | | | | computeMapping. Computing the cost of a mapping takes some time. Since in Fast mode, the cost is irrelevant, just spare some cycles by not computing it. In Greedy mode, we need to choose the best cost, that means that when the local cost gets more expensive than the best cost, we can stop computing the repairing and cost for the current mapping. llvm-svn: 270245
* [RegBankSelect] Use frequency and probability information to computeQuentin Colombet2016-05-202-7/+40
| | | | | | | | | more precise cost in Greedy mode. In Fast mode the cost is irrelevant so do not bother requiring that those passes get scheduled. llvm-svn: 270244
* Make tp offset computation target independent.Rafael Espindola2016-05-203-33/+36
| | | | | | | | This adds direct support for computing offsets from the thread pointer for both variants. Of the architectures we support, variant 1 is used only by aarch64 (but that doesn't seem to be documented anywhere.) llvm-svn: 270243
* [RegBankSelect] Use the Fast mode for functions with the optnone attribute.Quentin Colombet2016-05-201-0/+6
| | | | llvm-svn: 270242
* ObjectiveC: canonicalize "kindof id" to "id".Manman Ren2016-05-202-5/+27
| | | | | | | | There is no need to apply kindof on an unqualified id type. rdar://24753825 llvm-svn: 270241
* Make __FreeBSD_cc_version predefined macro configurable at build timeDimitry Andric2016-05-201-2/+9
| | | | | | | | | | | | | | | | | | The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version` predefined macro to a rather static value, calculated from the major OS version. In the FreeBSD base system, we will start incrementing the value of this macro whenever we make any signifant change to clang, so we need a way to configure the macro's value at build time. Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD build system using either the `-D` command line option, or an include file. Stock builds will keep the earlier value. Differential Revision: http://reviews.llvm.org/D20037 llvm-svn: 270240
* [obj2yaml][yaml2obj] Adding enumFallback for MachO load commandsChris Bieneman2016-05-203-3/+56
| | | | | | | | This adds support for handling unknown load commands, and a bogus_load_command tests. Unknown or unsupported load commands can be specified in YAML by their hex value. llvm-svn: 270239
* [OpenCL] Allow explicit cast of 0 to event_t.Yaxun Liu2016-05-204-0/+21
| | | | | | | | Patch by Aaron Enye Shi. Differential Revision: http://reviews.llvm.org/D17578 llvm-svn: 270238
* fix comments; NFCSanjay Patel2016-05-201-9/+8
| | | | llvm-svn: 270237
* use range-loops; NFCISanjay Patel2016-05-201-4/+2
| | | | llvm-svn: 270236
* [RegBankSelect] Specify different optimization mode for the pass.Quentin Colombet2016-05-202-4/+19
| | | | | | The mode should be choose by the target when instantiating the pass. llvm-svn: 270235
* fix documentation comments; NFCSanjay Patel2016-05-201-9/+8
| | | | llvm-svn: 270234
* Fix error reporting in register scavenger (lack of emergency spill slot)Krzysztof Parzyszek2016-05-201-7/+4
| | | | | | | | - Do not store Twine objects. - Remove report_fatal_error, since llvm_unreachable does terminate the program in release mode. llvm-svn: 270233
* [RegBankSelect] Add a method to avoid splitting while repairing.Quentin Colombet2016-05-202-0/+137
| | | | | | | | | | | | The previous choice of the insertion points for repairing was straightfoward but may introduce some basic block or edge splitting. In some situation this is something we can avoid. For instance, when repairing a phi argument, instead of placing the repairing on the related incoming edge, we may move it to the previous block, before the terminators. This is only possible when the argument is not defined by one of the terminator. llvm-svn: 270232
* [PM/PartiallyInlineLibCalls] Fix pass dependencies.Davide Italiano2016-05-201-10/+13
| | | | | | Inline getAnalysisUsage() while I'm here. llvm-svn: 270231
* [X86][AVX] Generalized matching for target shuffle combinesSimon Pilgrim2016-05-203-133/+161
| | | | | | | | | | | | This patch is a first step towards a more extendible method of matching combined target shuffle masks. Initially this just pulls out the existing basic mask matches and adds support for some 256/512 bit equivalents. Future patterns will require a number of features to be added but I wanted to keep this patch simple. I hope we can avoid duplication between shuffle lowering and combining and share more complex pattern match functions in future commits. Differential Revision: http://reviews.llvm.org/D19198 llvm-svn: 270230
* [X86][AVX] Sync with clang/test/CodeGen/avx-builtins.cSimon Pilgrim2016-05-201-211/+3303
| | | | llvm-svn: 270229
* [PartiallyInlineLibCalls] Remove dead includes. NFC.Davide Italiano2016-05-201-2/+0
| | | | llvm-svn: 270228
* [X86][AVX] Added _mm256_testc_si256/_mm256_testnzc_si256/_mm256_testz_si256 ↵Simon Pilgrim2016-05-201-0/+18
| | | | | | tests llvm-svn: 270227
* Eliminate unnecessary file access checks in Clang driver on WindowsAdrian McCarthy2016-05-201-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D20454 llvm-svn: 270226
* [PM/PartiallyInlineLibCalls] Convert to static function in preparation for ↵Davide Italiano2016-05-201-55/+49
| | | | | | porting this pass to the new PM. llvm-svn: 270225
* Add all the avx512 flavors to __builtin_cpu_supports's list.Benjamin Kramer2016-05-203-0/+63
| | | | | | | | This is matching what trunk gcc is accepting. Also adds a missing ssse3 case. PR27779. The amount of duplication here is annoying, maybe it should be factored into a separate .def file? llvm-svn: 270224
* [powerpc] mark static_tls.cc test as UNSUPPORTED on powerpc64Bill Seurer2016-05-201-0/+2
| | | | | | | An upcoming change for ld in binutils 2.26 causes this test to always fail. llvm-svn: 270223
* [SimplifyCFG] eliminate switch cases based on known range of switch conditionSanjay Patel2016-05-202-8/+10
| | | | | | | | | | | | This was noted in PR24766: https://llvm.org/bugs/show_bug.cgi?id=24766#c2 We may not know whether the sign bit(s) are zero or one, but we can still optimize based on knowing that the sign bit is repeated. Differential Revision: http://reviews.llvm.org/D20275 llvm-svn: 270222
* Correction to r270219: fix detection of invalid frame indexKrzysztof Parzyszek2016-05-201-1/+2
| | | | llvm-svn: 270220
* Skip entries with invalid indexes in the search loop in register scavengerKrzysztof Parzyszek2016-05-201-1/+4
| | | | llvm-svn: 270219
* [MCExpr] avoid UB via negation of INT_MINSanjay Patel2016-05-202-5/+8
| | | | | | | | | I accidentally exposed a bug in MCExpr::evaluateAsRelocatableImpl() with the test file added in: http://reviews.llvm.org/rL269977 Differential Revision: http://reviews.llvm.org/D20434 llvm-svn: 270218
* [Hexagon] Use pipe instead of temporary files in testsKrzysztof Parzyszek2016-05-203-6/+6
| | | | llvm-svn: 270217
* [Hexagon] Recognize "s" constraint in inline-asmKrzysztof Parzyszek2016-05-202-0/+9
| | | | llvm-svn: 270216
OpenPOWER on IntegriCloud