Displaying 20 results from an estimated 3000 matches similar to: "Question about GlobalOpt"
2016 Mar 22
1
Question about GlobalOpt
Hi Mehdi,
You are right – modifying the Function Attributes pass to mark “main” as norecurse would break the C standard (unless it has a similar statement regarding “main” that the C++ standard has – I cannot find it), so that’s a no-go. Looks like there was an attempt to bypass library calls in the Function Attributes pass for the purpose of detecting norecurse functions:
2016 Mar 22
3
Question about GlobalOpt
I think the conceptual issues have largely been sorted out, it is mostly
that it is *much* harder to deduce norecurse than it might seem like
superficially.
On Mon, Mar 21, 2016 at 4:02 PM Mehdi Amini <mehdi.amini at apple.com> wrote:
> On Mar 21, 2016, at 3:57 PM, Sanjin Sijaric via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
> GlobalOpt may not
2015 Nov 05
4
[PATCH] D14227: Add a new attribute: norecurse
[Adding llvm-dev and re-stating the situation for llvm-dev's benefit]
*RFC: A new attribute, "norecurse".*
In some cases, it is possible to demote global variables to local
variables. This is possible when the global is only used in one function,
and that function is known not to recurse (because if the function
recurses, a local variable cannot be equivalent to a global as the
2015 Nov 05
2
[PATCH] D14227: Add a new attribute: norecurse
Hi Aaron,
I think it must necessarily be exposed to users - clang must add it in
certain circumstances for example. I don't think this is particularly
different to many other attributes such as nocapture/nounwind, that are
exposed to users and can be set by users in exceptional circumstances but
are primarily inferred by the midend.
James
On Thu, 5 Nov 2015 at 16:03 Aaron Ballman <aaron
2016 Mar 22
2
Question about GlobalOpt
Hi,
On my phone right now but I'll fish out the pertinent threads when I get to
the office. Keyword searches for 'norecurse' on llvm-dev will probably get
most of them.
Indeed, this correctness improvement caused a performance regression on
some programs. There is a way to revert to the old, broken behaviour:
'-mllvm -force-attribute=main:norecurse'. Given how many people run
2015 Nov 05
2
[PATCH] D14227: Add a new attribute: norecurse
Ah I see.
I can't think of a way that would help users in any particular way offhand.
I hadn't considered exposing it to clang users - do you think there is
merit in that?
James
On Thu, 5 Nov 2015 at 16:08 Aaron Ballman <aaron at aaronballman.com> wrote:
> On Thu, Nov 5, 2015 at 11:06 AM, James Molloy <james at jamesmolloy.co.uk>
> wrote:
> > Hi Aaron,
> >
2015 Jan 30
2
[LLVMdev] [PATCH] Bugfix for missed dependency from store to load in buildSchedGraph().
Hi,
I have revisited the issue in buildSchedGraph() I talked about previously, and attached a few patches. The first tries to fix the issue, and the other two try to illustrate associated issues, emerged from applying it.
Is it OK to commit the first patch?
[PATCH] Bugfix for missed dependency from store to load in buildSchedGraph().
Bugfix for missed dependency from store to load in
2016 Aug 30
2
TryToShrinkGlobalToBoolean in GlobalOpt.cpp issue
Yes, the full test case is:
static int x = 100;
int y = whatever;
int main() {
x = -101;
y = whatever that's not whatever above;
printf("%d\n", y);
printf("%d\n", x);
return 0;
}
You are correct, in the above test case the globalopt does not make the
transformation.... however, I think the original issue still stands, it
really shouldn't be doing it
2014 Dec 16
3
[LLVMdev] ScheduleDAGInstrs.cpp
Hi,
Thank you for the reply.
>It looks to me like we can choose any subset of edges here and be correct. We're basically trying to prune/pinch the DAG edges here. They can easily blow up with AA sched. I would guess that isCtrl() edges are good ones to bypass because they could be a low-latecy edges, whereas true data dependencies from a load are expected to be >higher latency, so they
2014 Dec 14
2
[LLVMdev] ScheduleDAGInstrs.cpp
Hello again,
Sorry -- I think I found the problem somewhere else. I was a bit confused and missed the fact that adjustChainDeps() is called a few lines down and does just what I wanted :-)
I would like to instead ask another question:
Why is I->isCtrl() used in code like
// Iterate over chain dependencies only.
for (SUnit::const_succ_iterator I = SUb->Succs.begin(), E =
2015 Feb 11
2
[LLVMdev] [PATCH] Bugfix for missed dependency from store to load in buildSchedGraph().
Hi,
I would be happy to give it a try :-)
The fact that AA was added at a later point explains the situation a bit, as much fewer SUs should end up in RejectMemNodes without it.
RejectMemNodes is bad in that it mixes all the SUs together again, after having gone through the work of separating them by analyzing their underlying objects.
It is also very confusing to have two "stages" of
2014 Dec 19
2
[LLVMdev] ScheduleDAGInstrs.cpp
Hi,
I write again regarding buildSchedGraph(), as I am still not happy about things there.
I have found at least two examples which do not work out:
1)
SU(2) Store "Value A"
SU(1) Store "Value A"
SU(0) Load "Value A"
If MIsNeedChainEdge() returns false for SU(0) and SU(1), SU(0) is inserted into RejectedMemNodes and removed from its MemUses SU list, as this
2014 Dec 08
3
[LLVMdev] ScheduleDAGInstrs.cpp
Hi,
Can anyone help me to understand the ScheduleDAGInstrs::buildSchedGraph() method?
I find the handling of AliasChain is disturbing since:
1. A new alias chain add deps to all possibly aliasing SUs, and then clears those lists.
2. When AliasChain is present, the addChainDependency() method is called,
but the target hook areMemAccessesTriviallyDisjoint() called inside
2015 Sep 18
2
GlobalOPT and sections
Hello everyone,
This is a rather ancient code with Chris's name all over it, so I naturally feel humbled :)
I see a conceptual issue in lib/Transforms/IPO/GlobalOpt.cpp with several optimizations that create a copy of GlobalVariable without copying attributes from the original one.
Consider this one:
http://llvm.org/doxygen/GlobalOpt_8cpp_source.html
static bool
2015 Feb 10
2
[LLVMdev] [PATCH] Bugfix for missed dependency from store to load in buildSchedGraph().
Hi,
I have committed the patch now (svn id 228686).
Regarding the commenting you requested, I attach a patch. Feel free to make changes.
I found it difficult to explain what the code does in isolated places, and thus kept my
commenting quite short. This makes me feel like the code needs a bit of refactorization
to make it more simple and understandable.
Looking at the possibility of
2015 Sep 21
2
GlobalOPT and sections
Chris,
Thanks for the clarification... at least no bug report is due... and I am glad that I've asked.
In my case these transformations are rather useful and forcing them to copy original global variable section is making them compatible with our (rather important) use case, so I guess I will have to fix it locally.
Nevertheless if someone else would have a similar issue - I would be
2017 Jun 04
3
Is every intrinsic norecurse?
Hi folks,
I've been measuring some devirtualization statistics and I found that when
barriers are introduced, the number of functions marked as norecurse is
lower.
The llvm.group.barrier is obviously norecursive and I've been thinking: is
every intrinsic norecurse?
I think it make sense to mark all of the intrinsics that can be considered
as norecursive this way, so it won't gonna
2015 Nov 13
2
revision 252902
The test case that you added in this revision fails on several of the
power buildbots (for example,
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20127)
and also when I build it locally:
FAIL: Clang :: CodeGenCXX/main-norecurse.cpp (2951 of 27722)
******************** TEST 'Clang :: CodeGenCXX/main-norecurse.cpp'
FAILED ********************
Script:
--
2017 Oct 20
2
Is every intrinsic norecurse?
Hi,
Also, I think there is a bigger problem lurking than just with
norecurse. I think that in general, functionattrs is not very good with
attributes when intrinsics are present.
E.g.
https://bugs.llvm.org/show_bug.cgi?id=34696
Here dbg.value prevents both norecurse and readnone from being deduced.
So, it would be nice to fix this for norecurse, but it would be even
nicer to fix it for
2017 Nov 17
2
Ensuring that dead allocations from a custom allocator are killed by LLVM
Hello all,
I have a custom allocator, and would like to teach LLVM about its
semantics. In particular, I would like LLVM to kill allocations that are
"dead", similar to dead new in C++.
Consider this example:
; ModuleID = '<stdin>'
source_filename = "Module"
; Function Attrs: inaccessiblememonly noinline norecurse nounwind
declare i8* @alloc(i64)