Displaying 20 results from an estimated 7000 matches similar to: "Change in optimisation with UB in mind"
2017 Oct 03
2
Change in optimisation with UB in mind
Yes, the hairy-edges of undefined behaviour - UB is UB.
It does mean that given:
__attribute__((noinline)) int foo(int a, int b) { return a + b; }
int bar1(int x) { return foo(x, INT_MIN); }
int bar2(int x) { return x + INT_MIN; }
'bar1' and 'bar2' have different outcomes.
However, I think that the new optimisation is neat and valid and I am not suggesting that it should
2017 Oct 03
2
Change in optimisation with UB in mind
Hi Sanjoy,
Yes these are C tests (from 'gcc.c-torture/execute'), and as I indicated in my original message, the tests are not valid because the behaviour is undefined. However, it was while investigating these new failures in these tests that I realised that this optimisation existed.
The optimisation itself is perfectly valid, but it does mean that integer underflow will no longer be
2017 Sep 07
3
'-fsave-optimization-record' and VS2015 built compiler
Not 100% if this is an LLVM question or a CLang question, though I expect LLVM.
On Linux, if I pass '-fsave-optimization-record' to 'clang', then it produces a '*.opt.yaml' file. However, the same thing run on Windows using 'clang' built with VS2015 silently ignores this option.
Is this a bug or is it intentional? And if it is intentional, how can I configure
2017 Oct 03
2
'cl::opt' and range checking
Hi LLVM-Devs,
The LLVM 'cl::opt' templates are really useful, and provide a lot of flexibility. But I don't see any support for ranged options. What I would like is to have an option which is an integer type, and to restrict the set of values provided to a simple upper and lower bound, for example between 10 and 2000.
Is there a way of expressing this with the 'cl::opt'
2018 Jan 25
4
Adding a new target to 'llvm-lld'
Hi LLVM-Devs,
I am considering switching to using 'llvm-lld' instead of Gnu 'ld' in a future revision of our out-of-tree target, and I am wondering is there a getting started guide for how to go about extending 'llvm-lld' to support an additional target.
Thanks,
MartinO
--------------------------------------------------------------
Intel Research and Development
2017 Jul 18
3
PGO, zlib and 'default.profraw'
We are trying to get PGO working for our embedded out-of-tree target, but the utility 'llvm-profdata' does not like the data we are giving it.
Because this is not a hosted environment, we have to off-chip the profiling data ourselves, and although the data looks okay, 'llvm-profdata' reports the following error:
llvm-profdata show -all-functions -counts -detailed-summary -text
2017 Jun 29
3
Definitive list of optimisations at each optimisation level
On Mon, Jun 26, 2017 at 5:04 AM, ORiordan, Martin <martin.oriordan at intel.com
> wrote:
> Thanks Sean and Silva.
>
>
>
> I guess what I was seeking was a URL that I could point (non-compiler)
> people at, but I guess no such reference exists. What I can do if
> reference bot the source manager and use ‘-mllvm -debug-pass=Structure’
> for each optimisation level,
2017 Jun 25
2
Definitive list of optimisations at each optimisation level
I agree, it's much clearer, it just takes runs at multiple opt levels and
therefore I don't find it to be a "one stop shop".
On Jun 24, 2017 8:44 PM, "Sean Silva" <chisophugis at gmail.com> wrote:
> Looking at PassManagerBuilder can be useful because there are sometimes
> comments giving some idea of the intent of the particular choice of passes,
> but
2017 Dec 12
3
File/module scope inline assembly
I am trying to support an experimental DSL that uses non-C identifiers, but I want to write the implementation of the runtime support libraries for this DSL in C. The compiler is built using the LLVM v5.0.0 release branch.
To do this I thought I could simply write:
int foo() { return 42; } // The C implementation
asm(".alias nonCname foo"); // Make the non-C name be a synonym for
2017 Jul 18
4
PGO, zlib and 'default.profraw'
Can we improve the error message here? We should be able to check
zlib::isAvailable and give an error like "profile uses zlib compression
but the profile reader was built without zlib support" or so in this
case.
Xinliang David Li via llvm-dev <llvm-dev at lists.llvm.org> writes:
> The __llvm_prf_names section is compressed but your llvm-profdata tool is
> probably not built
2017 Jul 18
2
PGO, zlib and 'default.profraw'
set LLVM_ENABLE_ZLIB=ON with cmake invocation. zlib should be installed
and zlib.h header file needs to be in the header search path.
Is your llvm-profdata tool built together with clang?
David
On Tue, Jul 18, 2017 at 1:04 PM, Martin J. O'Riordan via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> How can I build the profile reader with ZLIB support enabled? I configure
> and
2018 Jan 25
0
Adding a new target to 'llvm-lld'
I'm not aware of a written guide either. In 2016 I did a talk on that
subject at the LLVM Cauldron
(http://llvm.org/devmtg/2016-09/#schedule) although quite a bit has
changed since then so I'm hesitant to recommend it apart from general
principles.
I can't speak for the COFF side as I've only worked on the ELF side of
LLD; my suggestions on where to start:
- Properties of the
2017 Jul 13
2
How to add custom instrumentation?
Hi everyone,
I run some functions using ORC JIT, now I need to add custom instrumentation.
I want to add two callbacks to each function: ‘enterFunction' at the beginning and ‘leaveFunction' at the end.
Intuition says that I could ‘just' insert CallInst's to the first and the last basic blocks in the function.
Am I correct? Are there any other/better way to do this? Is there
2018 Jan 18
2
CTPOP and zeroes
Quick question. The 'ISD::CTPOP' node allows a target to lower the counting of ones in a word to a single instruction. Our target also has an instruction for counting the zeroes in a word. Does CTPOP support counting of zeroes as well as ones instead of doing either "CTPOP(INVERT(operand))" or "N-bits - CTPOP(operand)"?
Thanks,
MartinO
2017 Jul 25
2
PGO, zlib and 'default.profraw'
Hi David,
When I use CMake to configure, ‘zlib’ and its header are detected - I build on CentOS 6.5 or CentOS 7. Since I run CMake from the command-line, I tried added ‘-DLLVM_ENABLE_ZLIB=0’ and ‘-DLLVM_ENABLE_ZLIB=1’ (using ‘-DLLVM_ENABLE_ZLIB=ON’ does not seem to work). Both ‘clang’ and ‘llvm-profdata’ (and all other tools and utilities) are configured and built together, in any event,
2018 Jan 18
0
CTPOP and zeroes
On 1/18/2018 12:57 AM, ORiordan, Martin via llvm-dev wrote:
> Quick question. The 'ISD::CTPOP' node allows a target to lower the counting of ones in a word to a single instruction. Our target also has an instruction for counting the zeroes in a word. Does CTPOP support counting of zeroes as well as ones instead of doing either "CTPOP(INVERT(operand))" or "N-bits -
2018 Jan 25
0
Adding a new target to 'llvm-lld'
On 25 January 2018 at 15:38, ORiordan, Martin via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi LLVM-Devs,
>
> I am considering switching to using 'llvm-lld' instead of Gnu 'ld' in a future revision of our out-of-tree target, and I am wondering is there a getting started guide for how to go about extending 'llvm-lld' to support an additional target.
I
2017 Sep 19
1
Changes to 'ADJCALLSTACK*' and 'callseq_*' between LLVM v4.0 and v5.0
Hi Serge,
Thanks for your help. I have looked at the change log, and so far as I can tell, my implementation is pretty much identical to all of the in-tree targets, but I’m missing something and can’t see what it is. I have simplified my TD description to just:
def MyCallseqStart : SDNode<"ISD::CALLSEQ_START",
SDCallSeqStart<[SDTCisVT<0, i32>,
2017 Jul 13
2
How to add custom instrumentation?
Thanks for the hint, I didn’t know about this option. That’s a great reference!
However, I am trying to be a compiler/language agnostic.
Also (for whatever reasons) I need a numeric ID of a function rather then its address.
So the question is still opened.
May I assume that the following always holds:
The first basic block in a function is an entry point and the last basic block in a function is
2017 Dec 19
3
DBG_VALUE insertion for spills breaks bundles
Hi,
The insertion of DBG_VALUE instructions for spills does not seem to be handling insert locations inside bundles well. If the spill instruction is part of a bundle, the new DBG_VALUE is inserted after it, but does not have the bundling flags set. This essentially means that if we start with a set of bundled instructions:
MI1 [BundledSucc=true, BundledPred=false]
MI2 [BundledSucc=false,