mehdi_amini (Mehdi AMINI)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 30 2013, 5:34 PM (251 w, 1 d)

Recent Activity

Mon, Feb 19

mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

Thanks all for the great feedbacks!

The final solution is much better than a dumb bump of the bitcode version.

LGTM.

Note: we need buy-in from LLVM 6.0 release manager (@hans ?) that this will be cherry-picked there before landing this in trunk.

This seems fine for 6.0 (it needs to land soon though), but why does it need to be cherry-picked to the branch before landing on trunk?

Mon, Feb 19, 11:37 AM

Fri, Feb 16

mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

Thanks all for the great feedbacks!

The final solution is much better than a dumb bump of the bitcode version.

LGTM.

Fri, Feb 16, 11:56 AM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

@hans : this needs to go in LLVM 6.0, is it OK?

Fri, Feb 16, 8:21 AM
mehdi_amini added a reviewer for D43253: bitcode support change for fast flags compatibility: hans.
Fri, Feb 16, 8:21 AM

Thu, Feb 15

mehdi_amini updated subscribers of D43253: bitcode support change for fast flags compatibility.

Strongly disagree. The new test's purpose is to provide functional testing on the new flags in the new format. Sanjay, now would be a good time to chime in.

Thu, Feb 15, 1:42 PM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

Case in point:

./bin/llvm-dis < /Users/michael_c_berg/llvm/llvm/test/Bitcode/compatibility-3.6.ll.bc | ./bin/FileCheck ../llvm/test/Bitcode/compatibility-3.6.ll
../llvm/test/Bitcode/compatibility-3.6.ll:617:11: error: expected string not found in input

; CHECK: %f.fast = fadd reassoc nnan ninf nsz arcp float %op1, %op2
         ^

<stdin>:445:2: note: scanning from here

%f.fast = fadd fast float %op1, %op2

in this case we are using my current patch with module version at 2 in the key .bc file, however we need the mapping as:

reassoc
nnan
ninf
nsz
arch
contract
afn

the new format writes reassoc in position 0 and aliases to UnsafeAlgebra incorrectly in this case, causing us to map fast, when less than fast was specified in the IR.
This will still be the case with the other format.

^
Thu, Feb 15, 1:31 PM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

So the compatibility .bc files in check test have usages of the current flag layout with reassoc, afn and the new layout, as has been the case since last Nov. These tests are not old fast format but sub flags tests in the new format, and require the new mapping.

Thu, Feb 15, 1:11 PM
mehdi_amini added a comment to D43348: Make FastMathFlags bitcode serialization to match LLVM 5.0 layout.

@tstellar YES.

Thu, Feb 15, 1:00 PM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

For the 6 bitcode files, they are special context, as they require the current fast sub flags format for part of their use, so we have to bring them up into the current context as they require the use of the new flags selectively with the bumped version number.

Can you elaborate what you mean by "they require the current fast sub flags format for part of their use"?

Thu, Feb 15, 1:00 PM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

I quickly put a patch to change the encoding, may be easier to discuss with code at hand: https://reviews.llvm.org/D43348
(I didn't try to build it, just a quick draft)

Thu, Feb 15, 12:11 PM
mehdi_amini created D43348: Make FastMathFlags bitcode serialization to match LLVM 5.0 layout.
Thu, Feb 15, 12:11 PM
mehdi_amini added inline comments to D43253: bitcode support change for fast flags compatibility.
Thu, Feb 15, 11:19 AM
mehdi_amini added inline comments to D43253: bitcode support change for fast flags compatibility.
Thu, Feb 15, 10:16 AM

Wed, Feb 14

mehdi_amini added inline comments to D43253: bitcode support change for fast flags compatibility.
Wed, Feb 14, 8:38 PM

Tue, Feb 13

mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

Actually if we're making this change, we consider that bitcode generated between the introduction of the new fast-math flags and now isn't supported anymore.
If so then we could instead of bumping a version, change the encoding of the FMF record (or create a new record type), so that the old encoding is upgraded but not the new one.
That would seem to me to be more in line with the usual handling of such situation in the bitcode.

Tue, Feb 13, 9:39 PM
mehdi_amini added inline comments to D43253: bitcode support change for fast flags compatibility.
Tue, Feb 13, 9:36 PM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

For the 6 bitcode files, they are special context, as they require the current fast sub flags format for part of their use, so we have to bring them up into the current context as they require the use of the new flags selectively with the bumped version number.

Tue, Feb 13, 9:16 PM
mehdi_amini added inline comments to D43253: bitcode support change for fast flags compatibility.
Tue, Feb 13, 1:06 PM
mehdi_amini added a comment to D43253: bitcode support change for fast flags compatibility.

Uploaded above are the 6 bitcode files we will need to replace for check to run successfully as these files had the old version number in them.

Tue, Feb 13, 1:02 PM

Tue, Feb 6

mehdi_amini updated subscribers of D42267: [ThinLTO] Allow 0 to be a valid value for pruning interval for C LTO API..
Tue, Feb 6, 1:04 PM

Jan 13 2018

mehdi_amini added a comment to D41297: [ThinLTO] Implement summary visualizer.

At which point of the API is this guarantee?

  1. ThinLTO.ModuleMap stores BitcodeModule objects and uses them during entire thin link phase (until backend threads are launched)
  2. BitcodeModule contains pointers to BC data, so this data should be actual for module to be parsed)
  3. Module summary is exported to .dot in CombinedIndexHook which is invoked in the beginning of thin link phase

None of these seems like API guarantee to me, it sounds like "this is what actually happens in practice today in this particular workflow".

It seems it must be a guarantee of the LTO API, since ThinLTO.ModuleMap holds the BitcodeModule objects and accesses their buffers through and after the thin link.

Jan 13 2018, 10:01 AM

Jan 12 2018

mehdi_amini added a comment to D41297: [ThinLTO] Implement summary visualizer.

At which point of the API is this guarantee?

  1. ThinLTO.ModuleMap stores BitcodeModule objects and uses them during entire thin link phase (until backend threads are launched)
  2. BitcodeModule contains pointers to BC data, so this data should be actual for module to be parsed)
  3. Module summary is exported to .dot in CombinedIndexHook which is invoked in the beginning of thin link phase
Jan 12 2018, 11:03 AM
mehdi_amini added inline comments to D41297: [ThinLTO] Implement summary visualizer.
Jan 12 2018, 8:58 AM

Jan 10 2018

mehdi_amini accepted D41465: [LTO] Support filtering by hotness threshold.

LGTM

Jan 10 2018, 6:22 AM

Jan 9 2018

mehdi_amini accepted D41624: Fix crash when linking metadata with ODR type uniquing.

The test still seems complex to me (do you need all the IR types? The code in the functions? And all these metadatas and metadata fields?

Jan 9 2018, 9:53 AM

Dec 29 2017

mehdi_amini added inline comments to D41624: Fix crash when linking metadata with ODR type uniquing.
Dec 29 2017, 1:00 AM

Dec 21 2017

mehdi_amini added inline comments to D41296: Limit size of non-GlobalValue name.
Dec 21 2017, 1:39 PM
mehdi_amini added a comment to D41296: Limit size of non-GlobalValue name.

Why don't we just cap all names at some point (and then just start adding numbers as we generally do to break degeneracies). It seems like, otherwise, we'll end up with these kinds of fixes in many places. Fixing this in one common place seems better.

I thought of this, very happy you suggest we go that way. In a release build, we could activate that by default and keep the names in debug build.

Dec 21 2017, 9:26 AM
mehdi_amini added inline comments to D41474: Fix a crash in lazy loading of Metadata in ThinLTO.
Dec 21 2017, 9:20 AM

Dec 18 2017

mehdi_amini added inline comments to D41279: [ThinLTO][C-API] Correct api comments.
Dec 18 2017, 9:49 AM
mehdi_amini added a comment to D41297: [ThinLTO] Implement summary visualizer.

@mehdi_amini I've updated diff with one which no longer requires post-processing at the cost of having extra StringRef in GlobalValueSummaryInfo

add notation about the importing decision, promotion, dead-elimination, ... on every edge/nodes.

It this supposed to be done as comments in DOT file?

Dec 18 2017, 9:03 AM

Dec 15 2017

mehdi_amini added a comment to D41267: [LTO] Make processing of combined module more consistent.

I agree that implicit contract about streams order is not nice here, and we should consider to make it explicit.

Dec 15 2017, 9:09 PM
mehdi_amini added a comment to D41267: [LTO] Make processing of combined module more consistent.

However small changes in input, could trigger combined module and shuffle outputs making life of llvm::LTO harder.

Sorry but this is still loaded in assumption about the client, which seems dubious in general to me.

At this point I am trying to solve problem is the gold plugin, however I'd expect this could be helpful for other clients as well.
Anyway why benefit of particular client without regressing behavior for the rest is a problem? Especially considering that the patch simplify implementation.

Dec 15 2017, 6:53 PM
mehdi_amini added a comment to D41267: [LTO] Make processing of combined module more consistent.

However small changes in input, could trigger combined module and shuffle outputs making life of llvm::LTO harder.

Dec 15 2017, 1:24 PM
mehdi_amini added inline comments to D41279: [ThinLTO][C-API] Correct api comments.
Dec 15 2017, 9:46 AM
mehdi_amini added a comment to D41297: [ThinLTO] Implement summary visualizer.

I suspect it should be possible to do this after the ThinLink and add notation about the importing decision, promotion, dead-elimination, ... on every edge/nodes.

Dec 15 2017, 9:44 AM
mehdi_amini added a comment to D41297: [ThinLTO] Implement summary visualizer.

Neat!

Dec 15 2017, 9:43 AM
mehdi_amini added a comment to D41274: [LTO] NFC: remove unique_ptr from some LTO::RegularLTOState members.

This patch doesn't seem motivated, the only effect I can see is that a ThinLTO link that don't include any LTO module would create a module while it was lazily created only if needed before.

Dec 15 2017, 12:06 AM

Dec 14 2017

mehdi_amini added a comment to D41267: [LTO] Make processing of combined module more consistent.

The commit message does not make much sense to me in the context of this C++ API: there is a non-negligible layer between the build and the build system rules and the LTO implementation, i.e. the linker.
Implementing a contract that makes it convenient for your build system in the implementation of the LTO "engine" behind this API looks like leaking abstractions to me.

Dec 14 2017, 11:09 PM

Dec 8 2017

mehdi_amini accepted D40970: [ThinLTO] Remove unused (?) code from thinLTOInternalizeModule.

I wrote this code in April 2016 ( http://reviews.llvm.org/D19103 ), in the very first approach to internalization, which was inferred in the backend and wasn't bullet proof (especially with respect to assembly by the way).
Since then, we moved all decision in the thin-link and this code is indeed (hopefully) dead.

Dec 8 2017, 9:16 AM
mehdi_amini added inline comments to D40970: [ThinLTO] Remove unused (?) code from thinLTOInternalizeModule.
Dec 8 2017, 9:10 AM

Nov 14 2017

mehdi_amini accepted D40005: NFC Remove default argument of DataLayout::getPointerABIAlignment.

LGTM.
Did you check clang?

Nov 14 2017, 8:45 PM
mehdi_amini accepted D40041: Use TempFile in lto caching.

LGTM

Nov 14 2017, 8:43 PM

Nov 13 2017

mehdi_amini added a comment to D39865: Use default member initialization where possible.

Was this done using clang-tidy (or similar tool) or manually?

Nov 13 2017, 5:44 PM

Nov 7 2017

mehdi_amini added a comment to D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts..

Oh ok, this is different than what thought the issue was. There isn't a correctness problem with this - the reference edge ensures correctness. It sounds like the only correctness issue then was due to the ld64 issue. (I thought there was also an issue with getting @f promoted when @ext was imported.) There isn't really a correctness issue with having both a reference and call edge though. Ideally we would have just the call edge and no reference edge, but that goes back to the earlier suggestion you had tried (changing the call site to look through pointer casts which had other issues). So I think this is fine. Sorry for the confusion.

Nov 7 2017, 8:13 PM

Nov 6 2017

mehdi_amini added a reviewer for D39373: Reorder Value.def to optimize code size: pcc.
Nov 6 2017, 10:44 AM
mehdi_amini added a reviewer for D39373: Reorder Value.def to optimize code size: rnk.
Nov 6 2017, 10:44 AM

Nov 3 2017

mehdi_amini added inline comments to D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts..
Nov 3 2017, 6:02 PM
mehdi_amini committed rL317391: Fix CMake definitions of tsan runtime to make it installed by "install-compiler….
Fix CMake definitions of tsan runtime to make it installed by "install-compiler…
Nov 3 2017, 5:07 PM
mehdi_amini closed D39621: Fix CMake definitions of tsan runtime to make it installed by "install-compiler-rt" by committing rL317391: Fix CMake definitions of tsan runtime to make it installed by "install-compiler….
Nov 3 2017, 5:07 PM
mehdi_amini created D39621: Fix CMake definitions of tsan runtime to make it installed by "install-compiler-rt".
Nov 3 2017, 3:53 PM

Nov 2 2017

mehdi_amini added inline comments to D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts..
Nov 2 2017, 6:05 PM

Oct 31 2017

mehdi_amini added inline comments to D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts..
Oct 31 2017, 8:37 PM

Oct 27 2017

mehdi_amini added inline comments to D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts..
Oct 27 2017, 1:23 PM

Oct 26 2017

mehdi_amini added inline comments to D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts..
Oct 26 2017, 8:24 PM

Oct 11 2017

mehdi_amini added inline comments to D38808: [CMake] Improve logic for enabling LTO on LLVM itself.
Oct 11 2017, 8:37 PM

Oct 2 2017

mehdi_amini added a comment to D38154: [PassManager] Run global opts after the inliner.

I'd recommend using LNT,

This seems like a really cumbersome process to expect folks to go through for changes intending to improve compile time. Is there no way to simplify it?

Oct 2 2017, 10:10 PM
mehdi_amini added a comment to D38154: [PassManager] Run global opts after the inliner.

Mehdi, would you feel comfortable with this as-is?

Oct 2 2017, 5:49 PM

Oct 1 2017

mehdi_amini added inline comments to D38154: [PassManager] Run global opts after the inliner.
Oct 1 2017, 10:58 PM
mehdi_amini added inline comments to D38154: [PassManager] Run global opts after the inliner.
Oct 1 2017, 10:48 PM
mehdi_amini added inline comments to D38154: [PassManager] Run global opts after the inliner.
Oct 1 2017, 10:29 PM

Sep 28 2017

mehdi_amini added inline comments to D38306: Cleanup some problems with LLVM_ENABLE_DUMP in release builds..
Sep 28 2017, 10:54 AM
mehdi_amini added inline comments to D38306: Cleanup some problems with LLVM_ENABLE_DUMP in release builds..
Sep 28 2017, 10:23 AM
mehdi_amini added a comment to D38298: A logic to copy LLVM licences into docker images..

And it would be nice to have this change right now as a quick workaround.

Sep 28 2017, 9:42 AM
mehdi_amini added a comment to D38298: A logic to copy LLVM licences into docker images..

"make install" is not primarily a distribution mechanism, docker is (most folks upload their docker images to public registries without thinking much about this).

I'm not sure why "primarily a distribution mechanism matters? How is one suppose to distribute?

docker push to a public registry?

Sep 28 2017, 8:34 AM
mehdi_amini added a comment to D38298: A logic to copy LLVM licences into docker images..

"make install" is not primarily a distribution mechanism, docker is (most folks upload their docker images to public registries without thinking much about this).

Sep 28 2017, 1:54 AM

Sep 27 2017

mehdi_amini added a comment to D38306: Cleanup some problems with LLVM_ENABLE_DUMP in release builds..

Ideally, I think all the headers would hide the method behind #ifdef LLVM_ENABLE_DUMP , so that it wouldn't be a linker failure but a compile time failure!

Sep 27 2017, 3:01 PM
mehdi_amini added a comment to D38306: Cleanup some problems with LLVM_ENABLE_DUMP in release builds..

Thanks for fixing this :)

Sep 27 2017, 2:59 PM
mehdi_amini added a comment to D38298: A logic to copy LLVM licences into docker images..

Can you elaborate why this script is desirable/needed?

Sure, sorry for leaving out the context.

Including licences is technically required in any binary distribution of LLVM, including ones inside Docker images.
Copying the licenses could be made optional, but always putting the licenses into Docker images should not hurt either.

Sep 27 2017, 1:49 PM

Sep 26 2017

mehdi_amini added a comment to D38298: A logic to copy LLVM licences into docker images..

Can you elaborate why this script is desirable/needed?

Sep 26 2017, 4:19 PM

Sep 18 2017

mehdi_amini added inline comments to D37993: [ThinLTO/gold] Implement ThinLTO cache pruning support.
Sep 18 2017, 5:05 PM

Sep 17 2017

mehdi_amini accepted D37961: [ThinLTO] Avoid archive member collisions with old API.
Sep 17 2017, 10:27 AM
mehdi_amini added a comment to D37961: [ThinLTO] Avoid archive member collisions with old API.

Did you check ld64 in Xcode 9? I think ld64 was fixed to append the suffix as well.

Sep 17 2017, 10:18 AM

Sep 4 2017

mehdi_amini committed rL312512: Emit static constexpr member as available_externally definition.
Emit static constexpr member as available_externally definition
Sep 4 2017, 8:59 PM

Sep 1 2017

mehdi_amini added a comment to D37410: LTO: Try to open cache files before renaming them..

LGTM

Sep 1 2017, 10:40 PM

Aug 31 2017

mehdi_amini added a comment to D37370: ModuleSummaryAnalysis: Correctly handle refs from function inline asm to module inline asm..

LGTM otherwise.

Aug 31 2017, 10:34 PM
mehdi_amini added inline comments to D37370: ModuleSummaryAnalysis: Correctly handle refs from function inline asm to module inline asm..
Aug 31 2017, 10:34 PM

Aug 28 2017

mehdi_amini added a comment to D37213: Changed Dockerfiles to install LLVM into /usr/local.

I don't mind where you install it, but we can also assume that someone who use this Dockerfile intends to use clang, so why not adding it to to update-alternatives as well, and even making it default for /usr/bin/c++ and /usr/bin/cc?

Aug 28 2017, 9:21 AM

Aug 27 2017

mehdi_amini added a comment to D34992: Emit static constexpr member as available_externally definition.

I'd like to also see a testcase for the situation where we trigger the emission of a declaration with an available_externally definition and then find we need to promote it to a "full" definition:

Aug 27 2017, 1:51 PM
mehdi_amini committed rL311858: CMake: only try to find the Z3 package when `CLANG_ANALYZER_BUILD_Z3` is ON.
CMake: only try to find the Z3 package when `CLANG_ANALYZER_BUILD_Z3` is ON
Aug 27 2017, 1:25 PM
mehdi_amini committed rL311857: Emit static constexpr member as available_externally definition.
Emit static constexpr member as available_externally definition
Aug 27 2017, 1:25 PM
mehdi_amini closed D34992: Emit static constexpr member as available_externally definition by committing rL311857: Emit static constexpr member as available_externally definition.
Aug 27 2017, 1:25 PM

Aug 25 2017

mehdi_amini added a comment to D37099: Added optional validation of svn sources to Dockerfiles..

Would this be all obsolete with git repos?

I would think so.

Also all the python code seems complicated to me for what is basically find | grep -v '/\.git/' | grep -v '/\.svn/' | LC_ALL=C sort | tar -cf - -T - --no-recursion | sha1sum, can you elaborate why this is needed?

That's roughly what I started with, but's it's more complicated if you want to compute separate checksums for projects inside single tree source checkout (i.e. llvm, llvm/tool/clang, llvm/projects/lldb, etc.).

Aug 25 2017, 11:52 AM

Aug 24 2017

mehdi_amini accepted D37098: Use temporary directory when building docker image..
Aug 24 2017, 10:15 PM
mehdi_amini added a comment to D37099: Added optional validation of svn sources to Dockerfiles..

Would this be all obsolete with git repos?

Aug 24 2017, 10:01 PM

Aug 20 2017

mehdi_amini added inline comments to D36910: [ThinLTO] WIP Tracking of per-call mod ref info.
Aug 20 2017, 10:33 AM

Aug 17 2017

mehdi_amini added a comment to D34992: Emit static constexpr member as available_externally definition.

Bi-weekly ping! (@rsmith)

Aug 17 2017, 8:29 AM
mehdi_amini accepted D36673: Addressed some security issues in Dockerfiles..

LGTM

Aug 17 2017, 8:17 AM

Aug 14 2017

mehdi_amini added a comment to D36713: [libc++] Add a persistent way to disable availability.

Seems fine to me. Adding @dexonsmith (I don't know who maintain libc++ at Apple right now)

Aug 14 2017, 3:25 PM
mehdi_amini updated subscribers of D36713: [libc++] Add a persistent way to disable availability.
Aug 14 2017, 3:24 PM

Aug 9 2017

mehdi_amini updated subscribers of D36556: [IR] AutoUpgrade ModuleFlagBehavior for PIC and PIE level.

Is this something that is affecting clang-5.0 backward compatibility with clang-4.0?
(adding @hansw for visibility)

Aug 9 2017, 10:41 PM
mehdi_amini updated subscribers of D36556: [IR] AutoUpgrade ModuleFlagBehavior for PIC and PIE level.
Aug 9 2017, 10:40 PM

Aug 8 2017

mehdi_amini accepted D33513: [ThinLTO] Fix ThinLTO crash while destroying context.

LGTM.

Aug 8 2017, 10:02 PM · lld

Aug 7 2017

mehdi_amini added inline comments to D36440: [ThinLTO] Fix thinLTO crash .
Aug 7 2017, 10:06 PM

Aug 5 2017

mehdi_amini accepted D33513: [ThinLTO] Fix ThinLTO crash while destroying context.
Aug 5 2017, 4:03 PM · lld

Aug 4 2017

mehdi_amini added inline comments to D34992: Emit static constexpr member as available_externally definition.
Aug 4 2017, 2:18 AM
mehdi_amini updated the diff for D34992: Emit static constexpr member as available_externally definition.

Address Richard's comment

Aug 4 2017, 2:17 AM

Aug 3 2017

mehdi_amini added a comment to D36233: [ThinLTO] Add FunctionAttrs to ThinLTO index.

I'll leave the final approval to Teresa.

Aug 3 2017, 4:48 PM
mehdi_amini added inline comments to D36233: [ThinLTO] Add FunctionAttrs to ThinLTO index.
Aug 3 2017, 4:45 PM
mehdi_amini added a comment to D36288: Use profile summary to disable peeling for huge working sets.

When the working set size is determined to be huge, disable peeling to avoid bloating the working set further.

Aug 3 2017, 4:43 PM