- Apr 27, 2016
-
-
Artur Pilipenko authored
Extract a part of isDereferenceableAndAlignedPointer functionality to Value::getPointerDerferecnceableBytes. Currently it's a NFC, but in future I'm going to accumulate all the logic about value dereferenceability in this function similarly to Value::getPointerAlignment function (D16144). Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17572 llvm-svn: 267708
-
Johannes Doerfert authored
If the base pointer of an invariant load is is loaded conditionally, that condition needs to hold for the invariant load too. The structure of the program will imply this for domain constraints but not for imprecisions in the modeling. To this end we will propagate the execution context of base pointers during code generation and thus ensure the derived pointer does not access an invalid base pointer. llvm-svn: 267707
-
Jonathan Coe authored
Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 llvm-svn: 267706
-
Rafael Espindola authored
It is now used only for relocations that only set the low bits inside a page. Everything else is handled by getRelExpr. I will send a another review renaming and better documenting isRelRelative. llvm-svn: 267705
-
Pavel Labath authored
The flakyness is no longer reproducible, and the tests seem to be passing reliably now. llvm-svn: 267704
-
Dmitry Vyukov authored
Current interface assumes that Go calls ProcWire/ProcUnwire to establish the association between thread and proc. With the wisdom of hindsight, this interface does not work very well. I had to sprinkle Go scheduler with wire/unwire calls, and any mistake leads to hard to debug crashes. This is not something one wants to maintian. Fortunately, there is a simpler solution. We can ask Go runtime as to what is the current Processor, and that question is very easy to answer on Go side. Switch to such interface. llvm-svn: 267703
-
Rafael Espindola authored
That way we only need to subtract the offset is relocateOne. llvm-svn: 267702
-
Rafael Espindola authored
This simplifies the logic for computing the value of the toc base. llvm-svn: 267701
-
Haojian Wu authored
Fix a crash in cppcoreguidelines-pro-type-member-init when checking a type with a template parameter as a base class. Summary: Fixed a crash in cppcoreguidelines-pro-type-member-init when encountering a type that uses one of its template parameters as a base when compiling for C++98. Patch by Michael Miller! Reviewers: aaron.ballman, alexfh, hokein Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19539 llvm-svn: 267700
-
Simon Pilgrim authored
llvm-svn: 267699
-
Rafael Espindola authored
llvm-svn: 267698
-
Alexander Kornienko authored
llvm-svn: 267697
-
Michael Zuckerman authored
[Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and VPBROADCAST instruction set . Differential Revision: http://reviews.llvm.org/D19196 llvm-svn: 267696
-
Alexey Bataev authored
declare reductions. If reduction clause is applied to instance of class with user-defined reduction operation without initialization clause, it may cause a crash. Patch fixes this issue. llvm-svn: 267695
-
Zlatko Buljan authored
Differential Revision: http://reviews.llvm.org/D16676 llvm-svn: 267694
-
Zlatko Buljan authored
[mips][microMIPS] Add CodeGen support for SLL16, SRL16, SLL, SLLV, SRA, SRAV, SRL and SRLV instructions Differential Revision: http://reviews.llvm.org/D17989 llvm-svn: 267693
-
Artur Pilipenko authored
This is required to use this function from isSafeToSpeculativelyExecute Reviewed By: hfinkel Differential Revision: http://reviews.llvm.org/D16231 llvm-svn: 267692
-
Vassil Vassilev authored
The Decl::isUsed has a value for every decl. In non-module builds it is very difficult (but possible) to break this invariant but when we walk up the redecl chain we find the neccessary information. When deserializing the decls from a module it is much more difficult to update correctly this invariant. The patch centralizes the information whether a decl is used in the canonical decl marking the entire entity as being used. Fixes https://llvm.org/bugs/show_bug.cgi?id=27401 Patch by Cristina Cristescu and me. Thanks to Richard Smith who helped to debug and understand the issue! Reviewed by Richard Smith. llvm-svn: 267691
-
Michael Zuckerman authored
Differential Revision: http://reviews.llvm.org/D19529 llvm-svn: 267690
-
Artur Pilipenko authored
Teach Value::getPointerAlignment that allocas with no explicit alignment are aligned to preferred alignment of the allocated type. Reviewed By: hfinkel Differential Revision: http://reviews.llvm.org/D17569 llvm-svn: 267689
-
Pavel Labath authored
llvm-svn: 267688
-
Haojian Wu authored
Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19583 llvm-svn: 267687
-
Simon Pilgrim authored
MOVMSK zeros the upper bits of the gpr - we should be able to use this. llvm-svn: 267686
-
George Rimar authored
llvm-svn: 267685
-
George Rimar authored
System V ABI 4.1 specifies that program header's p_vaddr should equal p_offset, modulo p_align. (https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-83432/index.html). It was possible to violate this using the linkerscript. Patch fixes the issue. Differential revision: http://reviews.llvm.org/D19416 llvm-svn: 267684
-
Haojian Wu authored
Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18694 llvm-svn: 267683
-
Dmitry Vyukov authored
warning: '__sanitizer::uptr __sanitizer::GetPreferredBase(const char*)' defined but not used llvm-svn: 267682
-
Dmitry Vyukov authored
llvm-svn: 267681
-
Dmitry Vyukov authored
llvm-svn: 267680
-
Dmitry Vyukov authored
tsan_debugging.cc: In function ‘void* __tsan_get_current_report()’: tsan_debugging.cc:61:18: warning: cast from type ‘const __tsan::ReportDesc*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] return (void *)rep; llvm-svn: 267679 -
Dmitry Vyukov authored
This is reincarnation of http://reviews.llvm.org/D17648 with the bug fix pointed out by Adhemerval (zatrazz). Currently ThreadState holds both logical state (required for race-detection algorithm, user-visible) and physical state (various caches, most notably malloc cache). Move physical state in a new Process entity. Besides just being the right thing from abstraction point of view, this solves several problems: Cache everything on P level in Go. Currently we cache on a mix of goroutine and OS thread levels. This unnecessary increases memory consumption. Properly handle free operations in Go. Frees are issue by GC which don't have goroutine context. As the result we could not do anything more than just clearing shadow. For example, we leaked sync objects and heap block descriptors. This will allow to get rid of libc malloc in Go (now we have Processor context for internal allocator cache). This in turn will allow to get rid of dependency on libc entirely. Potentially we can make Processor per-CPU in C++ mode instead of per-thread, which will reduce resource consumption. The distinction between Thread and Processor is currently used only by Go, C++ creates Processor per OS thread, which is equivalent to the current scheme. llvm-svn: 267678
-
Alexey Bataev authored
Currently there is a problem with codegen of inlined directives inside lambdas, it may cause a crash during codegen because of incorrect capturing of variables. Patch fixes this problem. llvm-svn: 267677
-
Ekaterina Romanova authored
(1) Removed \code.. \endcode tags around the instruction name. This matches the doxygen format for all other intrinsics. (2) Did a better formatting for the comments (to fit into 80 columns more compactly). llvm-svn: 267676
-
Adam Nemet authored
llvm-svn: 267675
-
Mohit K. Bhakkad authored
Reviewers: eugenis Subscribers: jaydeep, sagar, Sanitizers Differential Revision: http://reviews.llvm.org/D19531 llvm-svn: 267674
-
Simon Atanasyan authored
llvm-svn: 267673
-
Adam Nemet authored
Summary: D19403 adds a new pragma for loop distribution. This change adds support for the corresponding metadata that the pragma is translated to by the FE. As part of this I had to rethink the flag -enable-loop-distribute. My goal was to be backward compatible with the existing behavior: A1. pass is off by default from the optimization pipeline unless -enable-loop-distribute is specified A2. pass is on when invoked directly from opt (e.g. for unit-testing) The new pragma/metadata overrides these defaults so the new behavior is: B1. A1 + enable distribution for individual loop with the pragma/metadata B2. A2 + disable distribution for individual loop with the pragma/metadata The default value whether the pass is on or off comes from the initiator of the pass. From the PassManagerBuilder the default is off, from opt it's on. I moved -enable-loop-distribute under the pass. If the flag is specified it overrides the default from above. Then the pragma/metadata can further modifies this per loop. As a side-effect, we can now also use -enable-loop-distribute=0 from opt to emulate the default from the optimization pipeline. So to be precise this is the new behavior: C1. pass is off by default from the optimization pipeline unless -enable-loop-distribute or the pragma/metadata enables it C2. pass is on when invoked directly from opt unless -enable-loop-distribute=0 or the pragma/metadata disables it Reviewers: hfinkel Subscribers: joker.eph, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D19431 llvm-svn: 267672
-
Vaivaswatha Nagaraj authored
Summary: cloneLoopWithPreheader() does not update LoopInfo for sub-loop of the original loop being cloned. Add assert to ensure no sub-loops for loop being cloned. Reviewers: anemet, ashutosh.nema, hfinkel Subscribers: mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D15922 llvm-svn: 267671
-
Craig Topper authored
llvm-svn: 267670
-
Craig Topper authored
[Support][X86] Change the case values in the Intel family 6 code to hex so its easier to compare with Intel's docs. NFC llvm-svn: 267669
-