Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM performance with -use-cfl-aa #5533

Closed
coodie opened this issue Mar 6, 2017 · 4 comments
Closed

LLVM performance with -use-cfl-aa #5533

coodie opened this issue Mar 6, 2017 · 4 comments

Comments

@coodie
Copy link
Contributor

coodie commented Mar 6, 2017

This is place to discuss the last point in issue #5043 (" try -mllvm -use-cfl-aa for clang with --llvm-wide-opt.").

In general I noticed no difference between --llvm-wide-opt and --llvm-wide-opt with -use-cfl-aa.

Here are the details:

Effect of running printchplenv:

machine info: Linux goovie-ThinkPad-T430 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64
CHPL_HOME: /home/goovie/Dokumenty/Repozytoria/chapel/ *
script location: /home/goovie/Dokumenty/Repozytoria/chapel/util
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: gnu
CHPL_TARGET_ARCH: none *
CHPL_LOCALE_MODEL: flat
CHPL_COMM: gasnet *
  CHPL_COMM_SUBSTRATE: udp
  CHPL_GASNET_SEGMENT: everything
CHPL_TASKS: qthreads
CHPL_LAUNCHER: amudprun
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_MAKE: make
CHPL_ATOMICS: intrinsics
  CHPL_NETWORK_ATOMICS: none
CHPL_GMP: gmp
CHPL_HWLOC: hwloc
CHPL_REGEXP: none
CHPL_WIDE_POINTERS: node16 *
CHPL_AUX_FILESYS: none

Tests I used were the one in test/performance/ferguson/. What I did was run command (for file in the directory):

chpl --fast --llvm --llvm-wide-opt --ccflags -mllvm --ccflags -use-cfl-aa file.chpl -o file-cfl
chpl --fast --llvm --llvm-wide-opt file.chpl -o file-nocfl

and then

./file-cfl -nl 2 > cfl.out
./file-nocfl -nl 2 > nocfl.out
diff cfl.out nocfl.out

The diff command showed no difference for any file in that directory, thus I assume that in case of these tests cfl-aa has no improvement.

@ben-albrecht
Copy link
Member

ben-albrecht commented Mar 7, 2017

@mppf may be interested in this as the author of #5043.

@coodie
Copy link
Contributor Author

coodie commented Mar 7, 2017

@ben-albrecht
As far as I understood the purpose of this task was to check how does playing with different options in LLVM optimizer affects number of get/put operations (in general: communication), more details on how does llvm backend is supposed to optimize is here: http://ahayashi.blogs.rice.edu/files/2013/07/Chapel_LLVM_camera_ready-q6usv4.pdf.

Each of these tests has startCommDiagonstics()/getCommDiagnostics() pair around code tested for communication, and number of put/get is printed by the program itself. This isn't supposed to measure overall performance, but how many expensive put/get operations we managed to reduce using llvm, using time measurements for that would be inconclusive.

And yes, this is supposed to be viewed mostly by @mppf, we have an e-mail conversation and he told me to make github issue and describe exactly what I did.

@mppf
Copy link
Member

mppf commented Mar 7, 2017

@coodie - cool, thanks for making this issue about your experiment. Can you, with a limited amount of effort, figure out if the reason --use-cfl-aa has no effect is trivial ? E.g. is that alias analysis pass running in LLVM in your experiment at all? Is our generated LLVM IR including the information it needs to do its job? Is the LLVM IR output different with --use-cfl-aa ? (You can use --savec=tmp and that will produce two .bc files, one for before opts run, one for after).

@mppf
Copy link
Member

mppf commented Jul 3, 2017

Closing this now that it's linked from the LLVM issues issue.

@mppf mppf closed this as completed Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants